mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
add block coords to the debug panel
This commit is contained in:
parent
961773c9f9
commit
eea97337f5
1 changed files with 9 additions and 0 deletions
|
|
@ -113,6 +113,15 @@ std::shared_ptr<UINode> 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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue