SecondHalfGames / yakui

yakui is a declarative Rust UI library for games
Apache License 2.0
237 stars 21 forks source link

Gamepad and Keyboard Navigation #65

Closed LPGhatguy closed 1 year ago

LPGhatguy commented 2 years ago

Closes #7.

This is an early WIP. Navigation is done via a new widget method that lets widgets specify their connections: left, right, up, down, previous, and next.

Need to figure out how to bubble this information (should it be an event instead?) and how to render selection halos that reduces the burden of individual widgets.

We may want to decouple selection and focus, especially for things like sliders on controllers.

LPGhatguy commented 1 year ago

Merging this because it's so small. This likely needs a new PR and a new round of thinking anyhow.