ClanGenOfficial / clangen

Warrior Cats fan game
https://clangen.io
Other
249 stars 448 forks source link

[CODE] Improvements to Keybinds #2460

Open j-gynn opened 3 months ago

j-gynn commented 3 months ago

Description Keybinds need some love. I would absolutely love it if we could navigate through listed cats using a keyboard, with a little rectangle border to show which one is currently selected. For patrols especially, I know it's minor but as a physically disabled laptop user, every little mouse movement is a battle. Speaking of, this would be a huge win for accessibility!

scribblecrumb commented 3 months ago

Let me see what I can do with my rework. I've already reworked the cat lists into an element class and a rectangle border would be a relatively simple addition (i'm thinking i p much copy the implementation of the rectangle border in the symbol choosing screen. which, btw, is another screen that could benefit from this sort of keybind work).

My biggest worry with expanding keybinds is that the handle_event functions might start to become rather unmanageable. Thankfully, though, those functions are already getting condensed during my ongoing UI refactor, so maybe this is a nonissue. But I want us to try and find ways to avoid repetitive code and utilize the Screens class that all the screens inherit from to help keep it all in order.