add 'Show Paths' checkbox

This commit is contained in:
MihailRis
2025-08-27 19:31:34 +03:00
parent 98e9f5a2a9
commit ac1623f86c
4 changed files with 22 additions and 3 deletions
+14
View File
@@ -12,6 +12,7 @@
#include "graphics/render/WorldRenderer.hpp"
#include "graphics/render/ParticlesRenderer.hpp"
#include "graphics/render/ChunksRenderer.hpp"
#include "graphics/render/DebugLinesRenderer.hpp"
#include "logic/scripting/scripting.hpp"
#include "network/Network.hpp"
#include "objects/Player.hpp"
@@ -45,6 +46,7 @@ static std::shared_ptr<Label> create_label(GUI& gui, wstringsupplier supplier) {
// TODO: move to xml
// TODO: move to xml finally
// TODO: move to xml finally
// TODO: move to xml finally
std::shared_ptr<UINode> create_debug_panel(
Engine& engine,
Level& level,
@@ -261,6 +263,18 @@ std::shared_ptr<UINode> create_debug_panel(
});
panel->add(checkbox);
}
{
auto checkbox = std::make_shared<FullCheckBox>(
gui, L"Show Paths", glm::vec2(400, 24)
);
checkbox->setSupplier([=]() {
return DebugLinesRenderer::showPaths;
});
checkbox->setConsumer([=](bool checked) {
DebugLinesRenderer::showPaths = checked;
});
panel->add(checkbox);
}
{
auto checkbox = std::make_shared<FullCheckBox>(
gui, L"Show Generator Minimap", glm::vec2(400, 24)