diff --git a/plugins/autotrade.cpp b/plugins/autotrade.cpp index 8fbc75b89..ccc42f0e8 100644 --- a/plugins/autotrade.cpp +++ b/plugins/autotrade.cpp @@ -489,15 +489,19 @@ struct tradeview_hook : public df::viewscreen_tradegoodsst DEFINE_VMETHOD_INTERPOSE(void, render, ()) { INTERPOSE_NEXT(render)(); + + // Insert into the blank line between trade items and standard keys. + // The blank line at the bottom is taken by the search plugin. + auto dim = Screen::getWindowSize(); + int y = dim.y - 5; + int x = 2; - int y = 27; - OutputHotkeyString(x, y, "Mark all", "m", true, 2); - OutputHotkeyString(x, y, "Unmark all", "u"); + OutputHotkeyString(x, y, "Mark all, ", "m", false, x, COLOR_WHITE, COLOR_LIGHTRED); + OutputHotkeyString(x, y, "Unmark all", "u", false, x, COLOR_WHITE, COLOR_LIGHTRED); x = 42; - y = 27; - OutputHotkeyString(x, y, "Mark all", "Shift-m", true, 42); - OutputHotkeyString(x, y, "Unmark all", "Shift-u"); + OutputHotkeyString(x, y, "Mark all, ", "M", false, x, COLOR_WHITE, COLOR_LIGHTRED); + OutputHotkeyString(x, y, "Unmark all", "U", false, x, COLOR_WHITE, COLOR_LIGHTRED); } }; diff --git a/plugins/search.cpp b/plugins/search.cpp index b4d5d6cc0..18586657b 100644 --- a/plugins/search.cpp +++ b/plugins/search.cpp @@ -693,10 +693,10 @@ template V generic_search_hook ::module; // Hook definition helpers -#define IMPLEMENT_HOOKS_WITH_ID(screen, module, id) \ +#define IMPLEMENT_HOOKS_WITH_ID(screen, module, id, prio) \ typedef generic_search_hook module##_hook; \ - template<> IMPLEMENT_VMETHOD_INTERPOSE(module##_hook, feed); \ - template<> IMPLEMENT_VMETHOD_INTERPOSE(module##_hook, render) + template<> IMPLEMENT_VMETHOD_INTERPOSE_PRIO(module##_hook, feed, prio); \ + template<> IMPLEMENT_VMETHOD_INTERPOSE_PRIO(module##_hook, render, prio) #define IMPLEMENT_HOOKS(screen, module) \ typedef generic_search_hook module##_hook; \ @@ -1074,7 +1074,7 @@ class trade_search_merc : public trade_search_base public: virtual void render() const { - print_search_option(2, 26); + print_search_option(2, -1); if (!search_string.empty()) { @@ -1108,7 +1108,7 @@ private: } }; -IMPLEMENT_HOOKS_WITH_ID(df::viewscreen_tradegoodsst, trade_search_merc, 1); +IMPLEMENT_HOOKS_WITH_ID(df::viewscreen_tradegoodsst, trade_search_merc, 1, 100); class trade_search_fort : public trade_search_base @@ -1116,7 +1116,7 @@ class trade_search_fort : public trade_search_base public: virtual void render() const { - print_search_option(42, 26); + print_search_option(42, -1); if (!search_string.empty()) { @@ -1150,7 +1150,7 @@ private: } }; -IMPLEMENT_HOOKS_WITH_ID(df::viewscreen_tradegoodsst, trade_search_fort, 2); +IMPLEMENT_HOOKS_WITH_ID(df::viewscreen_tradegoodsst, trade_search_fort, 2, 100); // // END: Trade screen search