Skip to content

Commit ac3584b

Browse files
committed
Remove shouldRender, use better focus string
1 parent eba5ea9 commit ac3584b

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

trackstop.lua

+1-17
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ TrackStopOverlay = defclass(TrackStopOverlay, overlay.OverlayWidget)
5656
TrackStopOverlay.ATTRS{
5757
default_pos={x=-73, y=29},
5858
default_enabled=true,
59-
viewscreens='dwarfmode/ViewSheets/BUILDING/Trap',
59+
viewscreens='dwarfmode/ViewSheets/BUILDING/Trap/TrackStop',
6060
frame={w=25, h=4},
6161
frame_style=gui.MEDIUM_FRAME,
6262
frame_background=gui.CLEAR_PEN,
@@ -120,10 +120,6 @@ function TrackStopOverlay:setDumpDirection(direction)
120120
end
121121

122122
function TrackStopOverlay:render(dc)
123-
if not self:shouldRender() then
124-
return
125-
end
126-
127123
local building = dfhack.gui.getSelectedBuilding()
128124
local friction = building.friction
129125
local friction_cycle = self.subviews.friction
@@ -135,18 +131,6 @@ function TrackStopOverlay:render(dc)
135131
TrackStopOverlay.super.render(self, dc)
136132
end
137133

138-
function TrackStopOverlay:shouldRender()
139-
local building = dfhack.gui.getSelectedBuilding()
140-
return building and building.trap_type == df.trap_type.TrackStop
141-
end
142-
143-
function TrackStopOverlay:onInput(keys)
144-
if not self:shouldRender() then
145-
return
146-
end
147-
TrackStopOverlay.super.onInput(self, keys)
148-
end
149-
150134
function TrackStopOverlay:init()
151135
self:addviews{
152136
widgets.CycleHotkeyLabel{

0 commit comments

Comments
 (0)