UI States

Understanding how states are named in the asset

Normal

This is the default first choice that will occur without any input.

Selected

Mouse hover on the item or selected item via keyboard/controller in a list.

Unselected

This state is primarily used to call modules and events. This is the state that appears when a UI element enters the normal state from selected. This is used instead of normal because a UI element can be "normal" state by default when the game starts.

Pressed

This state is usually to change the style. While the mouse button is pressed down or for a limited time after a click. This is basically being pressed and clicked combined. This is used for styles because a single click can take a few milliseconds, so, visual change while being pressed only would create awkward looks in certain scenarios. How long after the click should the button hold the pressed style can be selected in the inspector if applicable.

Being Pressed

This state is primarily used to call modules and events. While the mouse click or touch is held down, the module or event is constantly called.

Press Complete

This state is primarily used to call modules and events. When the user releases the key. In other words, the frame when the button/key or touch "being pressed" is complete. Note that "press complete" won't work in events like if the user starts clicking on the button but moves the cursor/touch away from it before releasing it. This has been added because this gesture is generally used to cancel a press by users.

Disabled

The user can't interact with that part of the UI.

Focused/Out of Focus

Focused means a UI is ready to take input. Like you can type on an input field.

Note: We aren't using "selected" because the mouse hovering on a UI item is also called selected and that would interfere with InputFields expected behavior,

Last updated