calref / cboe

Classic Blades of Exile

Home Page:http://spiderwebforums.ipbhost.com/index.php?/forum/12-blades-of-exile/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

NQNStudios opened this issue · comments

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?)

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.

Part of this would involve extracting the alphabetization behavior here:

std::sort(scen_headers.begin(), scen_headers.end(), [](scen_header_type hdr_a, scen_header_type hdr_b) -> bool {

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.