player.get_selected_block

This commit is contained in:
MihailRis
2024-05-31 08:33:37 +03:00
parent 29ca6e969c
commit 74042b5c2a
13 changed files with 32 additions and 18 deletions
+6 -2
View File
@@ -79,8 +79,12 @@ std::shared_ptr<UINode> create_debug_panel(
if (def) {
stream << L" (" << util::str2wstr_utf8(def->name) << L")";
}
return L"block: "+std::to_wstring(player->selectedVoxel.id)+
L" "+stream.str();
if (player->selectedVoxel.id == BLOCK_VOID) {
return std::wstring {L"block: none"};
} else {
return L"block: "+std::to_wstring(player->selectedVoxel.id)+
L" "+stream.str();
}
}));
panel->add(create_label([=](){
return L"seed: "+std::to_wstring(level->getWorld()->getSeed());