Skip to content

Commit 9484f8e

Browse files
authored
vieport.window_x -> .coord
1 parent be5bccd commit 9484f8e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gui/tooltips.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ function GetScreenCoordinates(map_coord)
168168
if not map_coord then return end
169169
-- -> map viewport offset
170170
local vp = df.global.world.viewport
171-
local vp_Coord = vp.window_x -- is actually coord
171+
local vp_Coord = vp.corner
172172
local map_offset_by_vp = {
173173
x = map_coord.x - vp_Coord.x,
174174
y = map_coord.y - vp_Coord.y,
@@ -205,7 +205,7 @@ function TooltipsVizualizer:onRenderFrame(dc, rect)
205205
end
206206

207207
local vp = df.global.world.viewport
208-
local topleft = vp.window_x
208+
local topleft = vp.corner
209209
local width = vp.max_x
210210
local height = vp.max_y
211211
local bottomright = {x = topleft.x + width, y = topleft.y + height, z = topleft.z}

0 commit comments

Comments
 (0)