From 32930b03631045d74f3c63ac67371307800efb87 Mon Sep 17 00:00:00 2001 From: Helwor Date: Mon, 5 Aug 2024 00:38:33 +0200 Subject: [PATCH 1/2] Fix broken hovering when using scaled UI --- LuaUI/Widgets/chili/Controls/screen.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/LuaUI/Widgets/chili/Controls/screen.lua b/LuaUI/Widgets/chili/Controls/screen.lua index 260caec930..2520f9602e 100644 --- a/LuaUI/Widgets/chili/Controls/screen.lua +++ b/LuaUI/Widgets/chili/Controls/screen.lua @@ -179,7 +179,8 @@ function Screen:IsAbove(x, y, ...) return true end - y = select(2, Spring.GetViewSizes()) - y + y = select(2, Spring.Orig.GetViewSizes()) - y + x, y = x/WG.uiScale, y/WG.uiScale local hoveredControl = inherited.IsAbove(self, x, y, ...) --// tooltip From 9d4487fbde571e08db5eb3212048d0c62a1274e7 Mon Sep 17 00:00:00 2001 From: Helwor Date: Mon, 5 Aug 2024 00:42:32 +0200 Subject: [PATCH 2/2] same thing --- LuaUI/Widgets/chili_old/Controls/screen.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/LuaUI/Widgets/chili_old/Controls/screen.lua b/LuaUI/Widgets/chili_old/Controls/screen.lua index da6fb69745..851ab50651 100644 --- a/LuaUI/Widgets/chili_old/Controls/screen.lua +++ b/LuaUI/Widgets/chili_old/Controls/screen.lua @@ -156,7 +156,8 @@ function Screen:IsAbove(x,y,...) return true end - y = select(2,Spring.GetViewSizes()) - y + y = select(2,Spring.Orig.GetViewSizes()) - y + x, y = x/WG.uiScale, y/WG.uiScale local hoveredControl = inherited.IsAbove(self,x,y,...) --// tooltip