From 014987154e0cace174cb0e902854a402bba2c2da Mon Sep 17 00:00:00 2001 From: hexagon-recursion Date: Sun, 25 Aug 2024 10:17:41 +0300 Subject: [PATCH] Fix cursor position overlay --- colobot-base/src/ui/debug_menu.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/colobot-base/src/ui/debug_menu.cpp b/colobot-base/src/ui/debug_menu.cpp index 554e61cfa..f9be6f174 100644 --- a/colobot-base/src/ui/debug_menu.cpp +++ b/colobot-base/src/ui/debug_menu.cpp @@ -23,6 +23,7 @@ #include "common/event.h" #include "common/stringutils.h" +#include "common/global.h" #include "graphics/engine/engine.h" #include "graphics/engine/lightning.h" @@ -459,7 +460,7 @@ void CDebugMenu::HandleFrameUpdate(const Event &event) glm::vec3 pos; int obj; if ((obj = m_engine->DetectObject(event.mousePos, pos, true)) != -1) - str = StrUtils::Format("pos=% 3.2f; % 3.2f height=% 3.2f objId=% 4d", pos.x, pos.z, pos.y, obj); + str = StrUtils::Format("pos=% 3.2f; % 3.2f height=% 3.2f objId=% 4d", pos.x / g_unit, pos.z / g_unit, pos.y / g_unit, obj); CLabel* pl = static_cast(m_interface->SearchControl(EVENT_LABEL19)); if (pl == nullptr) return;