From 93897037b846b1f22b5adc7a64ed1907ea038284 Mon Sep 17 00:00:00 2001 From: StillGreen-san <40620628+StillGreen-san@users.noreply.github.com> Date: Sat, 2 Nov 2024 11:23:17 +0100 Subject: [PATCH] fix "Selected Block" text display --- ScuffedMinecraft/src/Application.cpp | 2 +- ScuffedMinecraft/src/Blocks.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ScuffedMinecraft/src/Application.cpp b/ScuffedMinecraft/src/Application.cpp index 811ec4b..eeec24a 100644 --- a/ScuffedMinecraft/src/Application.cpp +++ b/ScuffedMinecraft/src/Application.cpp @@ -511,7 +511,7 @@ int main(int argc, char *argv[]) ImGui::Text("Chunks: %d (%d rendered)", Planet::planet->numChunks, Planet::planet->numChunksRendered); ImGui::Text("Position: x: %f, y: %f, z: %f", camera.Position.x, camera.Position.y, camera.Position.z); ImGui::Text("Direction: x: %f, y: %f, z: %f", camera.Front.x, camera.Front.y, camera.Front.z); - ImGui::Text("Selected Block: %s", Blocks::blocks[selectedBlock].blockName); + ImGui::Text("Selected Block: %s", Blocks::blocks[selectedBlock].blockName.c_str()); if (ImGui::SliderInt("Render Distance", &Planet::planet->renderDistance, 0, 30)) Planet::planet->ClearChunkQueue(); if (ImGui::SliderInt("Render Height", &Planet::planet->renderHeight, 0, 10)) diff --git a/ScuffedMinecraft/src/Blocks.h b/ScuffedMinecraft/src/Blocks.h index e3a71c3..d8365e7 100644 --- a/ScuffedMinecraft/src/Blocks.h +++ b/ScuffedMinecraft/src/Blocks.h @@ -23,7 +23,7 @@ namespace Blocks Block(0, 2, 1, 3, Block::LEAVES, "Leaves"), // Leaves Block(1, 2, 2, 3, Block::BILLBOARD, "Grass"), // Grass - Block(3, 0, 4, 1, Block::BILLBOARD, "Tall Grass Bot"), // Tall Grass Bottom + Block(3, 0, 4, 1, Block::BILLBOARD, "Tall Grass Bottom"), // Tall Grass Bottom Block(3, 1, 4, 2, Block::BILLBOARD, "Tall Grass Top"), // Tall Grass Top Block(0, 3, 1, 4, Block::BILLBOARD, "Poppy"), // Poppy Block(2, 2, 3, 3, Block::BILLBOARD, "White Tulip"), // White Tulip