buildingplan: make hotkeys added to existing menus red

For clarity (per Lua API.rst guidelines)
develop
lethosor 2020-11-11 16:04:40 -05:00
parent 0958fdbf4b
commit c87d5260d3
No known key found for this signature in database
GPG Key ID: 76A269552F4F58C1
1 changed files with 17 additions and 11 deletions

@ -505,9 +505,9 @@ struct buildingplan_query_hook : public df::viewscreen_dwarfmodest
++y; ++y;
if (hasPrevFilter()) if (hasPrevFilter())
OutputHotkeyString(x, y, "Prev Item", "Ctrl+Left", true, left_margin); OutputHotkeyString(x, y, "Prev Item", "Ctrl+Left", true, left_margin, COLOR_WHITE, COLOR_LIGHTRED);
if (hasNextFilter()) if (hasNextFilter())
OutputHotkeyString(x, y, "Next Item", "Ctrl+Right", true, left_margin); OutputHotkeyString(x, y, "Next Item", "Ctrl+Right", true, left_margin, COLOR_WHITE, COLOR_LIGHTRED);
} }
}; };
@ -562,7 +562,7 @@ struct buildingplan_place_hook : public df::viewscreen_dwarfmodest
show_help = false; show_help = false;
return false; return false;
} }
initStatics(); initStatics();
if (in_dummy_screen) if (in_dummy_screen)
@ -724,8 +724,10 @@ struct buildingplan_place_hook : public df::viewscreen_dwarfmodest
OutputString(COLOR_WHITE, x, y, "Use Shift-Keys here", true, left_margin); OutputString(COLOR_WHITE, x, y, "Use Shift-Keys here", true, left_margin);
} }
OutputToggleString(x, y, "Planning Mode", "P", planmode_enabled[key], true, left_margin); OutputToggleString(x, y, "Planning Mode", interface_key::CUSTOM_SHIFT_P,
OutputHotkeyString(x, y, "Global Settings", "G", true, left_margin); planmode_enabled[key], true, left_margin, COLOR_WHITE, COLOR_LIGHTRED);
OutputHotkeyString(x, y, "Global Settings", interface_key::CUSTOM_SHIFT_G,
true, left_margin, COLOR_WHITE, COLOR_LIGHTRED);
if (!is_planmode_enabled(key)) if (!is_planmode_enabled(key))
return; return;
@ -739,16 +741,18 @@ struct buildingplan_place_hook : public df::viewscreen_dwarfmodest
if (item_can_be_improved(key, filter_idx)) if (item_can_be_improved(key, filter_idx))
{ {
OutputHotkeyString(x, y, "Min Quality: ", "QW"); OutputHotkeyString(x, y, "Min Quality: ", "QW", false, 0, COLOR_WHITE, COLOR_LIGHTRED);
OutputString(COLOR_BROWN, x, y, filter->getMinQuality(), true, left_margin); OutputString(COLOR_BROWN, x, y, filter->getMinQuality(), true, left_margin);
OutputHotkeyString(x, y, "Max Quality: ", "AS"); OutputHotkeyString(x, y, "Max Quality: ", "AS", false, 0, COLOR_WHITE, COLOR_LIGHTRED);
OutputString(COLOR_BROWN, x, y, filter->getMaxQuality(), true, left_margin); OutputString(COLOR_BROWN, x, y, filter->getMaxQuality(), true, left_margin);
OutputToggleString(x, y, "Decorated Only", "D", filter->getDecoratedOnly(), true, left_margin); OutputToggleString(x, y, "Decorated Only", interface_key::CUSTOM_SHIFT_D,
filter->getDecoratedOnly(), true, left_margin, COLOR_WHITE, COLOR_LIGHTRED);
} }
OutputHotkeyString(x, y, "Material Filter:", "M", true, left_margin); OutputHotkeyString(x, y, "Material Filter:", interface_key::CUSTOM_SHIFT_M, true,
left_margin, COLOR_WHITE, COLOR_LIGHTRED);
auto filter_descriptions = filter->getMaterials(); auto filter_descriptions = filter->getMaterials();
for (auto it = filter_descriptions.begin(); for (auto it = filter_descriptions.begin();
it != filter_descriptions.end(); ++it) it != filter_descriptions.end(); ++it)
@ -756,9 +760,11 @@ struct buildingplan_place_hook : public df::viewscreen_dwarfmodest
y += 2; y += 2;
if (hasPrevFilter()) if (hasPrevFilter())
OutputHotkeyString(x, y, "Prev Item", "Ctrl+Left", true, left_margin); OutputHotkeyString(x, y, "Prev Item", "Ctrl+Left", true,
left_margin, COLOR_WHITE, COLOR_LIGHTRED);
if (hasNextFilter()) if (hasNextFilter())
OutputHotkeyString(x, y, "Next Item", "Ctrl+Right", true, left_margin); OutputHotkeyString(x, y, "Next Item", "Ctrl+Right", true,
left_margin, COLOR_WHITE, COLOR_LIGHTRED);
} }
}; };