show hotkeys bound to number keys, F11, and F12

develop
myk002 2022-11-28 15:37:01 -08:00
parent 344ed4312b
commit 4e7b4dc554
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
2 changed files with 7 additions and 1 deletions

@ -44,6 +44,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
- `automaterial`: fix rendering errors with box boundary markers
- `autolabor` & `autohauler`: properly handle jobs 241, 242, and 243
- `autofarm`: add missing output flushes
- `hotkeys`: correctly detect hotkeys bound to number keys, F11, or F12
- Core: fix the segmentation fault with the REPORT event in EventManager
- Core: fix the new JOB_STARTED event only sending each event once, to the first handler listed
- Core: ensure ``foo.init`` always runs before ``foo.*.init`` (e.g. ``dfhack.init`` should always run before ``dfhack.something.init``)
@ -60,6 +61,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
- `ls`: indent tag listings and wrap them in the right column for better readability
- `ls`: new ``--exclude`` option for hiding matched scripts from the output. this can be especially useful for modders who don't want their mod scripts to be included in ``ls`` output.
- `hotkeys`: hotkey screen has been transformed into an interactive `overlay` widget that you can bring up by moving the mouse cursor over the hotspot (in the upper left corner of the screen by default)
- `hotkeys`: now supports printing active hotkeys to the console with ``hotkeys list``
- `digtype`: new ``-z`` option for digtype to restrict designations to the current z-level and down
- UX: List widgets now have mouse-interactive scrollbars
- UX: You can now hold down the mouse button on a scrollbar to make it scroll multiple times.

@ -76,11 +76,15 @@ static void find_active_keybindings(df::viewscreen *screen, bool filtermenu) {
vector<string> valid_keys;
for (char c = '0'; c <= '9'; c++) {
valid_keys.push_back(string(&c, 1));
}
for (char c = 'A'; c <= 'Z'; c++) {
valid_keys.push_back(string(&c, 1));
}
for (int i = 1; i < 10; i++) {
for (int i = 1; i < 13; i++) {
valid_keys.push_back("F" + int_to_string(i));
}