diff --git a/docs/changelog.txt b/docs/changelog.txt index 839a593a7..14b47663a 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -44,6 +44,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: ## Misc Improvements - `autonick`: additional nicknames based on burrowing animals, colours, gems, and minerals - `stockpiles`: added ``barrels``, ``organic``, ``artifacts``, and ``masterworks`` stockpile presets +- `orders`: only display import/export/sort/clear panel on main orders screen - Blueprint library: dreamfort: full rewrite and update for DF v50 - Blueprint library: pump_stack: updated walkthrough and separated dig and channel steps so boulders can be cleared - Blueprint library: aquifer_tap: updated walkthrough diff --git a/library/modules/Gui.cpp b/library/modules/Gui.cpp index d03bcce09..09c3887cb 100644 --- a/library/modules/Gui.cpp +++ b/library/modules/Gui.cpp @@ -200,6 +200,12 @@ DEFINE_GET_FOCUS_STRING_HANDLER(dwarfmode) case df::enums::info_interface_mode_type::JUSTICE: newFocusString += "/" + enum_item_key(game->main_interface.info.justice.current_mode); break; + case df::enums::info_interface_mode_type::WORK_ORDERS: + if (game->main_interface.info.work_orders.conditions.open) + newFocusString += "/Conditions"; + else + newFocusString += "/Default"; + break; default: break; } diff --git a/plugins/lua/orders.lua b/plugins/lua/orders.lua index 50197fce4..7a87e529f 100644 --- a/plugins/lua/orders.lua +++ b/plugins/lua/orders.lua @@ -66,7 +66,7 @@ OrdersOverlay = defclass(OrdersOverlay, overlay.OverlayWidget) OrdersOverlay.ATTRS{ default_pos={x=53,y=-6}, default_enabled=true, - viewscreens='dwarfmode/Info/WORK_ORDERS', + viewscreens='dwarfmode/Info/WORK_ORDERS/Default', frame={w=30, h=4}, } @@ -142,6 +142,7 @@ function OrdersOverlay:init() end function OrdersOverlay:onInput(keys) + if df.global.game.main_interface.job_details.open then return end if keys.CUSTOM_ALT_M then self.minimized = not self.minimized return true @@ -151,6 +152,11 @@ function OrdersOverlay:onInput(keys) end end +function OrdersOverlay:render(dc) + if df.global.game.main_interface.job_details.open then return end + OrdersOverlay.super.render(self, dc) +end + OVERLAY_WIDGETS = { overlay=OrdersOverlay, }