From 4d287d360f91abc9d50e7573e4f5c1dcc5713994 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Mon, 24 Jun 2024 19:23:10 -0700 Subject: [PATCH] measure from correct screen edge --- gui/sandbox.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/sandbox.lua b/gui/sandbox.lua index 33cd589c84..e99e3d3a64 100644 --- a/gui/sandbox.lua +++ b/gui/sandbox.lua @@ -222,7 +222,7 @@ function Sandbox:onInput(keys) local scr = dfhack.gui.getDFViewscreen(true) if dfhack.gui.matchFocusString('dwarfmode/ViewSheets/UNIT/Overview', scr) then local interface_rect = gui.ViewRect{rect=gui.get_interface_rect()} - local button_rect = interface_rect:viewport(60, 50, 20, 3) + local button_rect = interface_rect:viewport(interface_rect.width-77, interface_rect.height-7, 20, 3) local mouse_x, mouse_y = dfhack.screen.getMousePos() if mouse_x and button_rect:inClipGlobalXY(mouse_x, mouse_y) then return true