Skip to content

Commit 7e53def

Browse files
authored
render mouse tooltips over unit banners
Also, don't import ResizingPanel separately
1 parent 2e1cf87 commit 7e53def

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

gui/tooltips.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ local RELOAD = false -- set to true when actively working on this script
77
local gui = require('gui')
88
local widgets = require('gui.widgets')
99
local overlay = require('plugins.overlay')
10-
local ResizingPanel = require('gui.widgets.containers.resizing_panel')
1110

1211
--------------------------------------------------------------------------------
1312

@@ -233,7 +232,7 @@ end
233232
-- MouseTooltip is an almost copy&paste of the DimensionsTooltip
234233
--
235234
if RELOAD then MouseTooltip = nil end
236-
MouseTooltip = defclass(MouseTooltip, ResizingPanel)
235+
MouseTooltip = defclass(MouseTooltip, widgets.ResizingPanel)
237236

238237
MouseTooltip.ATTRS{
239238
frame_style=gui.FRAME_THIN,
@@ -330,8 +329,11 @@ local function GetScreenCoordinates(map_coord)
330329
end
331330

332331
function TooltipsOverlay:render(dc)
332+
self:render_unit_banners(dc)
333333
TooltipsOverlay.super.render(self, dc)
334+
end
334335

336+
function TooltipsOverlay:render_unit_banners(dc)
335337
if not config.follow_units then return end
336338

337339
if not dfhack.screen.inGraphicsMode() and not gui.blink_visible(500) then

0 commit comments

Comments
 (0)