From 661eacf2237eb51b96197d9b52ba4560565054da Mon Sep 17 00:00:00 2001 From: lethosor Date: Tue, 17 Feb 2015 14:13:37 -0500 Subject: [PATCH 1/2] Always show trackstop menus when visible --- plugins/trackstop.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/trackstop.cpp b/plugins/trackstop.cpp index 9999a899f..943360cd9 100644 --- a/plugins/trackstop.cpp +++ b/plugins/trackstop.cpp @@ -44,7 +44,7 @@ struct trackstop_hook : public df::viewscreen_dwarfmodest { }; building_trapst *get_selected_trackstop() { - if (!Gui::dwarfmode_hotkey(Core::getTopViewscreen()) || ui->main.mode != ui_sidebar_mode::QueryBuilding) { + if (ui->main.mode != ui_sidebar_mode::QueryBuilding) { // Not in a building's 'q' menu. return nullptr; } @@ -198,7 +198,7 @@ struct roller_hook : public df::viewscreen_dwarfmodest { }; building_rollersst *get_selected_roller() { - if (!Gui::dwarfmode_hotkey(Core::getTopViewscreen()) || ui->main.mode != ui_sidebar_mode::QueryBuilding) { + if (ui->main.mode != ui_sidebar_mode::QueryBuilding) { // Not in a building's 'q' menu. return nullptr; } From 3750b8c589fd6b563a9e3e0d5f392e8ef47e8f9a Mon Sep 17 00:00:00 2001 From: lethosor Date: Tue, 17 Feb 2015 14:13:53 -0500 Subject: [PATCH 2/2] Add "DFHack" indicator to trackstop menus --- plugins/trackstop.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/trackstop.cpp b/plugins/trackstop.cpp index 943360cd9..d21df0e36 100644 --- a/plugins/trackstop.cpp +++ b/plugins/trackstop.cpp @@ -182,6 +182,8 @@ struct trackstop_hook : public df::viewscreen_dwarfmodest { ), true, left_margin); OutputString(COLOR_LIGHTRED, x, y, Screen::getKeyDisplay(interface_key::BUILDING_TRACK_STOP_DUMP)); OutputString(COLOR_WHITE, x, y, ": Activate/change direction", true, left_margin); + y += 1; + OutputString(COLOR_GREY, x, y, "DFHack"); } } }; @@ -293,6 +295,8 @@ struct roller_hook : public df::viewscreen_dwarfmodest { "Highest" )); OutputString(COLOR_WHITE, x, y, " Speed", true, left_margin); + y += 1; + OutputString(COLOR_GREY, x, y, "DFHack"); } } };