nicbarker / clay

High performance UI layout library in C.
https://nicbarker.com/clay
zlib License
12.66k stars 444 forks source link

Add an example that supports gamepad/keyboard based navigation #224

Open ajusa opened 1 month ago

ajusa commented 1 month ago

This was briefly discussed on the discord, but it would be very helpful to have a good example that shows how to extend Clay to support gamepad/keyboard based navigation in a UI.

I'm imagining something similar to https://www.youtube.com/watch?v=DYWTw19_8r4, but with arrow keys/d-pad allowing for navigation between the top menu, the bottom panel, and the left panel, and supporting scrolling with the d-pad. Hopefully this is possible to do with Clay as is - if it isn't, it may be helpful to extend the API to declare "focusable" elements somehow.