#bevy #egui #input

bevy-egui-kbgp

Better keyboard and gamepad story for egui in Bevy

10 releases (6 breaking)

Uses new Rust 2021

0.7.0 Aug 1, 2022
0.6.0 May 3, 2022
0.5.0 Apr 17, 2022
0.4.0 Apr 13, 2022
0.1.2 Mar 22, 2022

#661 in Game dev

Download history 31/week @ 2022-06-12 19/week @ 2022-06-19 7/week @ 2022-06-26 28/week @ 2022-07-03 49/week @ 2022-07-10 22/week @ 2022-07-17 39/week @ 2022-07-24 77/week @ 2022-07-31 33/week @ 2022-08-07 22/week @ 2022-08-14 62/week @ 2022-08-21 39/week @ 2022-08-28 58/week @ 2022-09-04 27/week @ 2022-09-11 29/week @ 2022-09-18 16/week @ 2022-09-25

138 downloads per month

MIT/Apache

70KB
1K SLoC

Build Status Latest Version Rust Documentation

Bevy egui KBGP - improved keyboard and gamepad usage for egui in Bevy

egui is an immediate mode GUI framework, that can be used inside the Bevy game engine with the bevy_egui crate.

egui is very mouse-oriented, and while it does support tab-navigation, game menus should be navigatable by the arrow keys (and/or by WASD) and by gamepads.

This is where the bevy-egui-kbgp crate comes in. It allows to navigate egui widgets using the keyboard's arrow keys and using a gamepad's d-pad and left joystick (by default - all the controls can be redfined). It also allows activating these buttons from the gamepad.

Try it out in https://idanarye.github.io/bevy-egui-kbgp/demos/example

Features

  • Navigate the GUI using arrow keys and gamepads.
  • Activate buttons from gamepads (egui already supports activation from keyboard with Space/Enter)
  • User defined actions for the entire UI or for individual widgets.
  • Customize all these controls.
  • Key assignment.

Planned features

  • Support for comboboxes.
  • Figure out how to support navigating out of textboxes.

Versions

bevy bevy_egui bevy-egui-kbgp
0.8 0.15 0.7
0.7 0.14 0.6
0.7 0.13 0.5
0.6 0.12 0.1 - 0.4

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~20–30MB
~572K SLoC