Skip to content

Commit 9c99659

Browse files
committed
use new squads focus strings
1 parent dd9592c commit 9c99659

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

gui/civ-alert.lua

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,17 @@ CivalertOverlay.ATTRS{
118118
frame={w=20, h=5},
119119
}
120120

121+
local function is_squads_panel_open()
122+
return dfhack.gui.matchFocusString('dwarfmode/Squads/Default',
123+
dfhack.gui.getDFViewscreen(true))
124+
end
125+
121126
local function should_show_alert_button()
122-
return can_clear_alarm() or
123-
(df.global.game.main_interface.squads.open and can_sound_alarm())
127+
return can_clear_alarm() or (is_squads_panel_open() and can_sound_alarm())
124128
end
125129

126130
local function should_show_configure_button()
127-
return df.global.game.main_interface.squads.open
128-
and not can_sound_alarm() and not can_clear_alarm()
131+
return is_squads_panel_open() and not can_sound_alarm() and not can_clear_alarm()
129132
end
130133

131134
local function launch_config()

internal/confirm/specs.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ ConfirmSpec{
330330
-- sticks out the left side so it can move with the panel
331331
-- when the screen is resized too narrow
332332
intercept_frame={r=32, t=19, w=101, b=3},
333-
context='dwarfmode/SquadEquipment/Customizing/Default',
333+
context='dwarfmode/Squads/Equipment/Customizing/Default',
334334
predicate=function(keys, mouse_offset)
335335
if keys._MOUSE_R then
336336
return uniform_has_changes()

uniform-unstick.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ EquipOverlay.ATTRS{
332332
desc='Adds a link to the equip screen to fix equipment conflicts.',
333333
default_pos={x=7,y=21},
334334
default_enabled=true,
335-
viewscreens='dwarfmode/SquadEquipment/Default',
335+
viewscreens='dwarfmode/Squads/Equipment/Default',
336336
frame={w=MIN_WIDTH, h=1},
337337
}
338338

0 commit comments

Comments
 (0)