Merge pull request #3484 from myk002/myk_orders

[orders] don't display overlay on subscreens
develop
Myk 2023-06-20 07:06:43 -07:00 committed by GitHub
commit bdaf24d9bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 1 deletions

@ -44,6 +44,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
## Misc Improvements ## Misc Improvements
- `autonick`: additional nicknames based on burrowing animals, colours, gems, and minerals - `autonick`: additional nicknames based on burrowing animals, colours, gems, and minerals
- `stockpiles`: added ``barrels``, ``organic``, ``artifacts``, and ``masterworks`` stockpile presets - `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: 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: pump_stack: updated walkthrough and separated dig and channel steps so boulders can be cleared
- Blueprint library: aquifer_tap: updated walkthrough - Blueprint library: aquifer_tap: updated walkthrough

@ -200,6 +200,12 @@ DEFINE_GET_FOCUS_STRING_HANDLER(dwarfmode)
case df::enums::info_interface_mode_type::JUSTICE: case df::enums::info_interface_mode_type::JUSTICE:
newFocusString += "/" + enum_item_key(game->main_interface.info.justice.current_mode); newFocusString += "/" + enum_item_key(game->main_interface.info.justice.current_mode);
break; 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: default:
break; break;
} }

@ -66,7 +66,7 @@ OrdersOverlay = defclass(OrdersOverlay, overlay.OverlayWidget)
OrdersOverlay.ATTRS{ OrdersOverlay.ATTRS{
default_pos={x=53,y=-6}, default_pos={x=53,y=-6},
default_enabled=true, default_enabled=true,
viewscreens='dwarfmode/Info/WORK_ORDERS', viewscreens='dwarfmode/Info/WORK_ORDERS/Default',
frame={w=30, h=4}, frame={w=30, h=4},
} }
@ -142,6 +142,7 @@ function OrdersOverlay:init()
end end
function OrdersOverlay:onInput(keys) function OrdersOverlay:onInput(keys)
if df.global.game.main_interface.job_details.open then return end
if keys.CUSTOM_ALT_M then if keys.CUSTOM_ALT_M then
self.minimized = not self.minimized self.minimized = not self.minimized
return true return true
@ -151,6 +152,11 @@ function OrdersOverlay:onInput(keys)
end end
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_WIDGETS = {
overlay=OrdersOverlay, overlay=OrdersOverlay,
} }