Skip to content

Add gamepad support for feathers / headless widgets #21260

@alice-i-cecile

Description

@alice-i-cecile

What problem does this solve or what need does it fill?

Throughout the bevy_ui_widgets codebase, we have convenient baked-in interactions, like updating a checkbox in response to Enter if it's focused. See checkbox_on_key_input for an example of this.

This should work with gamepads too! Bevy is a game engine, and this is nice for accessibility in other apps too.

What solution would you like?

We should also listen to Gamepad::South from any gamepad in the same way.

This is common enough that I would ideally like to abstract this into an intermediate event.

What alternative(s) have you considered?

Simply implementing this directly is fine, but this is a common pattern that deserves a bit more encapsulation to make it easier to refactor and use in end user widgets.

Additional context

Related to #435, but we shouldn't block on that. If sane, non-configurable defaults are good enough for keyboard, they're good enough for gamepad.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-InputPlayer input via keyboard, mouse, gamepad, and moreA-UIGraphical user interfaces, styles, layouts, and widgetsC-FeatureA new feature, making something new possibleD-ComplexQuite challenging from either a design or technical perspective. Ask for help!S-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!X-ContentiousThere are nontrivial implications that should be thought through

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions