calref / cboe

Classic Blades of Exile
http://spiderwebforums.ipbhost.com/index.php?/forum/12-blades-of-exile/
Other
167 stars 41 forks source link

Feature idea: Letter keys in scenario picker dialog -> Goto alphabetical #336

Open NQNStudios opened 1 year ago

NQNStudios commented 1 year ago

If I have the whole archive of scenarios installed it can be painful clicking through pages of 3 to find one. What if pressing a letter key jumped to the first page with a custom scenario that starts with that letter? (Edge case: If no custom scenario starts with the letter, maybe do nothing?)

CelticMinstrel commented 1 year ago

I think if no scenario begins with that letter it should jump to the position where a scenario beginning with that letter would fit into the listing.

NQNStudios commented 1 year ago

Part of this would involve extracting the alphabetization behavior here:

https://github.com/calref/cboe/blob/ca816995ba9da539ed08a568616fbf36bea8bde0/src/game/boe.fileio.cpp#L344

It discounts articles "a" and "the" from alphabetization. (Which would also be a "gotcha" if the game were translatable.)

Letter key shortcuts would want to do the same, so the stripping of those articles should be made into a reusable function name_for_sort or something, which the std::sort comparator would use, and the hotkeys would use.