Skip to content

Commit

Permalink
Fix cursor position overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
hexagonrecursion committed Aug 25, 2024
1 parent aad5918 commit 0149871
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion colobot-base/src/ui/debug_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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<CLabel*>(m_interface->SearchControl(EVENT_LABEL19));
if (pl == nullptr) return;
Expand Down

0 comments on commit 0149871

Please sign in to comment.