Added category filtering for hotkeys in settings window - #9957
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
|
Hi @pazam-h2 , this implementation contradicts the overall UX design of the game: none of text elements are clickable. An ideal solution it to embed these categories into the list itself. |
|
Changed from text elements to just a list. |
|
Hi @pazam-h2 , could you please provide a screenshot of the window for the original 640x480 resolution? |
58aa00c to
7efc094
Compare
| const char * getHotKeyCategoryDisplayName( const Game::HotKeyCategory category ) | ||
| { | ||
| switch ( category ) { | ||
| case Game::HotKeyCategory::DEFAULT: | ||
| return "Default"; | ||
| case Game::HotKeyCategory::GLOBAL: | ||
| return "Global"; | ||
| case Game::HotKeyCategory::BATTLE: | ||
| return "Battle"; | ||
| case Game::HotKeyCategory::TOWN: | ||
| return "Town"; | ||
| case Game::HotKeyCategory::ARMY: | ||
| return "Army"; | ||
| default: | ||
| return Game::getHotKeyCategoryName( category ); | ||
| } | ||
| } |
There was a problem hiding this comment.
Can you please explain why we don't use Game::getHotKeyCategoryName(0 function instead?
There was a problem hiding this comment.
I used a separate display-name helper here because the category list has much less horizontal space than the popup/title text, and some of the existing names from Game::getHotKeyCategoryName() overlap the next column.
For example, labels like "Default Action", "Global Action", "Battle Screen", "Town Screen" and "Army Action" are clear in a popup, but in the left-side category list they make the dialog feel more crowded. The shorter labels "Default", "Global", "Battle", "Town" and "Army" seem easier to scan as filter names.
I understand that duplicating names is not ideal, but that's the solution I found. If you still prefer I can keep using Game::getHotKeyCategoryName() and adjust this in another way.
My intention was only to make the category list more compact and readable.


This PR adds a visual category selector to the Hotkeys settings dialog, allowing users to filter hotkeys by category.
The category names are displayed in a 2-line layout above the hotkey list. Selecting a category filters the list accordingly.
EDIT 1: the placement of the categories have been changed to be on the left side as an organized list.
EDIT 2: added an 'All' button to have the hotkeys list unfiltered.
EDIT 3: added Category sub-title
from:

To:

Closes #9940