Skip to content

Adding focus traversal to GUI #1270

Open
@eschan145

Description

@eschan145

In a standard GUI application, a user can switch the focus of widgets by pressing Tab and going back with Shift-Tab. It would be nice if that could be implemented in the current arcade GUI. You would need a focus property for each widget to see if it had focus and do something (eg. use an OpenGL filter to make it glow) and a focus property for the UIManager. The focus property in the UIManager could be used to find out which widget had the current focus.

Check out this example and try pressing Tab several times. Note that the focus switches between the entries. UILabels should not have focus traversal. Once a widget has focus, the user could call it with a keyboard shortcut (like Space to dispatch the on_press event for buttons and Up and Down to scroll up and down in TextAreas.

Metadata

Metadata

Assignees

Labels

enhancementguiRelated to arcade GUI (sub module arcade.gui)

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions