Open umut-sahin opened 3 weeks ago
Some additional resources that might be helpful: UI navigation RFC for bevy, by the same author of ui-navigation: https://github.com/bevyengine/bevy/pull/5378 Bevy pull request for UI keyboard navigation: https://github.com/bevyengine/bevy/pull/8882 Gamepad support in bevy_ui by mouse emulation: https://github.com/bevyengine/bevy/issues/6553
(Also note that the mentioned ui-navigation doesn't support bevy 0.13 or 0.14, see https://github.com/nicopap/ui-navigation/issues/41) (Edit, see also the up-to-date https://github.com/rparrett/bevy-alt-ui-navigation-lite)
I have just merged gamepad support to Lunex (v0.2.2 or bleeding edge "Dev"). You can now move cursor with your gamepad.
I changed the current cursor implementation to account for gamepad controlled movement. I have completely ditched default mod picking input plugin and wrote a custom one, so now each Cursor2d acts as a virtual pointer instead.
Now each Cursor2d
requires this bundle for picking to work
PointerBundle::new(PointerId::Custom(pointer::Uuid::new_v4())),
GamepadCursor
marker component, that you can add to your cursor to make it pull data from gamepad.GamepadCursorMode::Snap
which changes the behavior of the cursor from "free hand movement" to "snap to the next node", which is probably preferred for Games targeting controller directly.Are there any future plans for keyboard navigation support?
Once cursor snapping is implemented, it will be trivial to map the input events to keyboard presses.
All that would need to be done is to make a system that listens to button presses and writes events.
First of all, thanks for the lovely crate :heart_hands:
I haven't seen anything about UI navigation with keyboard or controller input. I don't think it's supported in bevypunk either.
So I have a few questions:
I find this pretty critical, especially for handheld gaming consoles like Steam Deck. There is also the fact that pretty much all major games support UI navigation with keyboard. In the end, it would be great to have it in
bevy_lunex
as well!(btw, https://github.com/nicopap/ui-navigation is a good example of what this issue is about)