arcade icon indicating copy to clipboard operation
arcade copied to clipboard

Enhancement: Add Disabled and Error states for UI elements

Open pushfoo opened this issue 3 years ago • 3 comments

Enhancement request:

What should be added/changed?

UI elements should have the following added to them:

  • a disabled property to turn interaction on and off
  • disabled visual style option to configure their disabled appearances
  • An error visual state to reflect that the current input is incorrect
  • some method of tracking the current error

What would it help with?

Any game or application state where buttons are not currently enabled, or needs to highlight what is wrong with user input.

For a concrete example of the disabled state, it would be useful for a turn-based game where the player at the keyboard sometimes cannot take certain actions, such as when it is another player or a bot's turn.

pushfoo avatar Jun 22 '22 19:06 pushfoo

Disable state implemented.

eruvanos avatar Apr 02 '23 16:04 eruvanos

While a general error state might be interesting, it makes the most sense for components, which allow user input. Which is especially the UITextInput.

UITextInput does not support any style at the moment. So it would make sense to add the error and disabled state especially for this widget, with support for styling in general. I will dump some thoughts on this.

Not sure, which attributes should be changed by style and which by property.

eruvanos avatar May 03 '23 20:05 eruvanos

I think an error state may still make sense for other widgets. For example, if you had two incompatible options selected and wanted to highlight this to the user.

pushfoo avatar May 03 '23 20:05 pushfoo