Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
1ed5e22
Create tooltips.lua
TymurGubayev Jan 4, 2025
7abc355
Create tooltips.rst
TymurGubayev Jan 4, 2025
66dce0d
Update docs/gui/tooltips.rst
TymurGubayev Jan 6, 2025
c27777a
Update gui/tooltips.lua
TymurGubayev Jan 6, 2025
0ca5a9a
enter emoticons
TymurGubayev Jan 7, 2025
0f6aeba
fix GetScreenCoordinates for ASCII mode
TymurGubayev Jan 7, 2025
be5bccd
tooltips.rst: add IMPORTANT NOTE as well as some clarifications
TymurGubayev Jan 7, 2025
9484f8e
vieport.window_x -> .coord
TymurGubayev Jan 12, 2025
33dbe85
use `getUnitsInBox(pos1, pos2)` overload
TymurGubayev Jan 12, 2025
8d345a7
make this an overlay
TymurGubayev Jan 12, 2025
66d8d39
make possible to show specific stress/happiness levels; add config UI
TymurGubayev Jan 18, 2025
e97201c
trim trailing whitespaces
TymurGubayev Jan 18, 2025
2e1cf87
fix an ASCII mode exception
TymurGubayev Jan 18, 2025
7e53def
render mouse tooltips over unit banners
TymurGubayev Feb 1, 2025
ec27b39
use list instead of labels in config UI
TymurGubayev Feb 1, 2025
5ec1e54
persist config (globally)
TymurGubayev Feb 1, 2025
6c98c34
Merge branch 'master' into gui/tooltips/1
TymurGubayev Feb 21, 2025
7abd0f9
Delete docs/gui/tooltips.rst
TymurGubayev Feb 21, 2025
bb4972f
Delete gui/tooltips.lua
TymurGubayev Feb 21, 2025
561eeab
implement gui/spectate.lua
TymurGubayev Feb 21, 2025
3c3fa05
adjust starting position
TymurGubayev Feb 21, 2025
40f3913
Merge branch 'master' into HEAD
myk002 Feb 22, 2025
46689c2
refactor UI and use upstreamed functionality
myk002 Feb 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion gui/tooltips.lua
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ local function GetUnitNameAndJob(unit)
end

local function GetTooltipText(pos)
if not pos then return end

local txt = {}
local units = dfhack.units.getUnitsInBox(pos, pos) or {} -- todo: maybe (optionally) use filter parameter here?

Expand Down Expand Up @@ -267,7 +269,7 @@ function MouseTooltip:render(dc)

local pos = dfhack.gui.getMousePos()
local text = GetTooltipText(pos)
if #text == 0 then return end
if not text or #text == 0 then return end
self.label:setText(text)

local sw, sh = dfhack.screen.getWindowSize()
Expand Down
Loading