You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
alice-i-cecile opened this issue
Nov 11, 2022
· 3 comments
Labels
A-InputPlayer input via keyboard, mouse, gamepad, and moreA-UIGraphical user interfaces, styles, layouts, and widgetsC-FeatureA new feature, making something new possible
What problem does this solve or what need does it fill?
bevy_ui is, first and foremost a game UI library. However, it is currently very challenging to work with via a gamepad.
What solution would you like?
When used in menus, gamepads should:
control the mouse cursor with either analog sticks or the d-pad
click buttons (typically when A is pressed)
This requires:
a configurable sensitivity that converts these gamepad movements into mouse motion
a way to detect whether the KBM or gamepad is being used to drive the UI
a way to control whether or not this behavior should be enabled
What alternative(s) have you considered?
You can work around this by mocking mouse movement and mouse button presses, tied to gamepad controls.
However this is non-obvious, frustrating, and not terribly robust.
Additional context
A full-fledged UI navigation system as laid out in bevyengine/rfcs#41 would be very helpful to supplement this, but is not required. Emulating mouse-like behavior is plenty.
The text was updated successfully, but these errors were encountered:
alice-i-cecile
added
C-Feature
A new feature, making something new possible
A-Input
Player input via keyboard, mouse, gamepad, and more
A-UI
Graphical user interfaces, styles, layouts, and widgets
D-Complex
Quite challenging from either a design or technical perspective. Ask for help!
labels
Nov 11, 2022
/// A resource that determines which input mode the player is usingenumInputMode{KBM,Gamepad,}fnset_input_mode(mutinput_mode:ResMut<InputMode>,gamepad_events:EventReader<GamepadEvent>,keyboard_events:EventReader<KeyboardInput>,mouse_events:EventReader<MouseMotion>,){if !keyboard_events.is_empty() || !mouse_events.is_empty(){*input_mode = InputMode::KBM;}if !gamepad_events.is_empty(){*input_mode = InputMode::Gamepad;}}
This code is working well to set the input mode for me.
A-InputPlayer input via keyboard, mouse, gamepad, and moreA-UIGraphical user interfaces, styles, layouts, and widgetsC-FeatureA new feature, making something new possible
What problem does this solve or what need does it fill?
bevy_ui is, first and foremost a game UI library. However, it is currently very challenging to work with via a gamepad.
What solution would you like?
When used in menus, gamepads should:
This requires:
What alternative(s) have you considered?
You can work around this by mocking mouse movement and mouse button presses, tied to gamepad controls.
However this is non-obvious, frustrating, and not terribly robust.
Additional context
A full-fledged UI navigation system as laid out in bevyengine/rfcs#41 would be very helpful to supplement this, but is not required. Emulating mouse-like behavior is plenty.
The text was updated successfully, but these errors were encountered: