Disabling UI Elements
- 50541507
- Mar 28, 2022
- 1 min read
In order to make my Queue button work to its fullest, I needed to disable and grey-out the UI elements in the Multiplayer screen to make sure no values can be changed whilst queueing. I achieved this by simply adding a state to each element I made called "bIsEnable" (bIsEnabled is taken by default in the engine) and grey out the colours if it's true, and didn't let any animations play. This is to show the user that not only does it look different, it doesn't function either, therefore functioning well as a disabled state. Also, the term "greyed-out" is used so much now that whenever users see a greyed-out element that's different to the rest, they assume that it's not functional. I'm using this because it's engrained in the user's mind from other programs and games already, which feeds into Repetition in the C.R.A.P. acronym.

I made custom functions for setting the enabled state in my elements which look like this:


This 5v5 Maps function takes the array of map checkboxes (effectively making them a group of which functions and variables can be changed in mass easily) and changed the enabled state of them to whatever is set when the function is called, which I do when the Cancel or Queue buttons are clicked, setting them to true with the Cancel click, and false with the Queue click.



Comments