bevyengine / bevyengine/bevy

Add gamepad support for feathers / headless widgets

Open
#21,260 2 comments 0 reactions 0 assignees View on GitHub
A-Input A-UI C-Feature D-Complex S-Ready-For-Implementation X-Contentious
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## 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.

Contributor guide

Open the contributing guide

Research direction

Start in the bevy_ui_widgets codebase by reading checkbox_on_key_input and tracing how the existing Enter interaction reaches focused widgets. Identify the common interaction point for keyboard and gamepad input, then check how related widgets handle the same behavior. Done means Gamepad::South from any gamepad produces the corresponding default interaction consistently, with any shared event abstraction kept usable by end-user widgets.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.