Skip to content

Controller support within GUI #2601

Open
@eruvanos

Description

@eruvanos

Vision:

GUI should support controller input without or just a little effort.

Tasks:

  • General focus traversal
  • Pass controller events as UIEvents
  • provide first example
  • Make all interactable widgets usable:
    • UITexturedButton
    • UIFlatButton
    • UISlider
    • UIDropdown
  • Handle different views
  • Interoperability with ActionsInput
  • Global switch to toggle focus handling
  • UIWidgets have to show focus themselves

Task from Feedback

Discord

  • If a controller connects multiple times, it crashes because of .open, which can be simply catched with a try except ( I did it on my machine)
  • UIDropdown overlay widgets cant be focused, because they are not re-detected on show
  • can only click on UISlider, and if so, it will set it to the middle value
  • Currently i have an issue with UIGridLayout and UIScrollbar not working together. The focus is in the wrong place. Image attached.
  • UIFlatButtons and UITextureButtons dont count focus as hover, which i think would be a nice addition

PR: #2566

Details

  • An adapter handles connected controllers and passes on_ controller callbacks to the UIManager as UIEvents
  • A UIFocusMixin can be used to make Layouts handle controller input
  • to support UIScrollArea, UIFocusGroup or UIFocusMixin has to be inside of it

Further notes

It might be a good idea to provide some ControllerWindow or something which passes controller events to the window, so the UIManager enable/disable flow could just work.

Metadata

Metadata

Assignees

Labels

enhancementguiRelated to arcade GUI (sub module arcade.gui)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions