From eea97337f5813aaebba900361a19045410c98916 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Wed, 6 Nov 2024 03:17:42 +0300 Subject: [PATCH] add block coords to the debug panel --- src/frontend/debug_panel.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/frontend/debug_panel.cpp b/src/frontend/debug_panel.cpp index 1e028d59..cd0869b1 100644 --- a/src/frontend/debug_panel.cpp +++ b/src/frontend/debug_panel.cpp @@ -113,6 +113,15 @@ std::shared_ptr create_debug_panel( L" "+stream.str(); } })); + panel->add(create_label([=]() -> std::wstring { + const auto& vox = player->selection.vox; + if (vox.id == BLOCK_VOID) { + return L"x: - y: - z: -"; + } + return L"x: " + std::to_wstring(player->selection.actualPosition.x) + + L" y: " + std::to_wstring(player->selection.actualPosition.y) + + L" z: " + std::to_wstring(player->selection.actualPosition.z); + })); panel->add(create_label([=]() { auto eid = player->getSelectedEntity(); if (eid == ENTITY_NONE) {