mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-12 22:41:49 +00:00
Merge pull request #751 from alexei-zebra/update-debug-panel
Update debug panel
This commit is contained in:
commit
764d280a4c
1 changed files with 117 additions and 70 deletions
|
|
@ -1,27 +1,34 @@
|
||||||
|
#include <bitset>
|
||||||
|
#include <memory>
|
||||||
|
#include <sstream>
|
||||||
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include "audio/audio.hpp"
|
#include "audio/audio.hpp"
|
||||||
|
#include "constants.hpp"
|
||||||
|
#include "content/Content.hpp"
|
||||||
#include "delegates.hpp"
|
#include "delegates.hpp"
|
||||||
#include "engine/Engine.hpp"
|
#include "engine/Engine.hpp"
|
||||||
#include "settings.hpp"
|
|
||||||
#include "hud.hpp"
|
|
||||||
#include "content/Content.hpp"
|
|
||||||
#include "graphics/core/Mesh.hpp"
|
#include "graphics/core/Mesh.hpp"
|
||||||
#include "graphics/ui/elements/CheckBox.hpp"
|
|
||||||
#include "graphics/ui/elements/TextBox.hpp"
|
|
||||||
#include "graphics/ui/elements/TrackBar.hpp"
|
|
||||||
#include "graphics/ui/elements/InputBindBox.hpp"
|
|
||||||
#include "graphics/ui/GUI.hpp"
|
|
||||||
#include "graphics/render/WorldRenderer.hpp"
|
|
||||||
#include "graphics/render/ParticlesRenderer.hpp"
|
|
||||||
#include "graphics/render/ChunksRenderer.hpp"
|
#include "graphics/render/ChunksRenderer.hpp"
|
||||||
#include "graphics/render/DebugLinesRenderer.hpp"
|
#include "graphics/render/DebugLinesRenderer.hpp"
|
||||||
|
#include "graphics/render/ParticlesRenderer.hpp"
|
||||||
|
#include "graphics/render/WorldRenderer.hpp"
|
||||||
|
#include "graphics/ui/GUI.hpp"
|
||||||
|
#include "graphics/ui/elements/CheckBox.hpp"
|
||||||
|
#include "graphics/ui/elements/InputBindBox.hpp"
|
||||||
|
#include "graphics/ui/elements/TextBox.hpp"
|
||||||
|
#include "graphics/ui/elements/TrackBar.hpp"
|
||||||
|
#include "hud.hpp"
|
||||||
#include "logic/scripting/scripting.hpp"
|
#include "logic/scripting/scripting.hpp"
|
||||||
#include "network/Network.hpp"
|
#include "network/Network.hpp"
|
||||||
|
#include "objects/Entities.hpp"
|
||||||
|
#include "objects/Entity.hpp"
|
||||||
|
#include "objects/EntityDef.hpp"
|
||||||
#include "objects/Player.hpp"
|
#include "objects/Player.hpp"
|
||||||
#include "objects/Players.hpp"
|
#include "objects/Players.hpp"
|
||||||
#include "objects/Entities.hpp"
|
|
||||||
#include "objects/EntityDef.hpp"
|
|
||||||
#include "objects/Entity.hpp"
|
|
||||||
#include "physics/Hitbox.hpp"
|
#include "physics/Hitbox.hpp"
|
||||||
|
#include "settings.hpp"
|
||||||
#include "util/stringutil.hpp"
|
#include "util/stringutil.hpp"
|
||||||
#include "voxels/Block.hpp"
|
#include "voxels/Block.hpp"
|
||||||
#include "voxels/Chunk.hpp"
|
#include "voxels/Chunk.hpp"
|
||||||
|
|
@ -30,12 +37,6 @@
|
||||||
#include "world/Level.hpp"
|
#include "world/Level.hpp"
|
||||||
#include "world/World.hpp"
|
#include "world/World.hpp"
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <memory>
|
|
||||||
#include <sstream>
|
|
||||||
#include <bitset>
|
|
||||||
#include <utility>
|
|
||||||
|
|
||||||
using namespace gui;
|
using namespace gui;
|
||||||
|
|
||||||
static std::shared_ptr<Label> create_label(GUI& gui, wstringsupplier supplier) {
|
static std::shared_ptr<Label> create_label(GUI& gui, wstringsupplier supplier) {
|
||||||
|
|
@ -54,10 +55,7 @@ static bool should_keep_previous(GUI& gui) {
|
||||||
// TODO: move to xml finally
|
// TODO: move to xml finally
|
||||||
// TODO: move to xml finally
|
// TODO: move to xml finally
|
||||||
std::shared_ptr<UINode> create_debug_panel(
|
std::shared_ptr<UINode> create_debug_panel(
|
||||||
Engine& engine,
|
Engine& engine, Level& level, Player& player, bool allowDebugCheats
|
||||||
Level& level,
|
|
||||||
Player& player,
|
|
||||||
bool allowDebugCheats
|
|
||||||
) {
|
) {
|
||||||
auto network = engine.getNetwork();
|
auto network = engine.getNetwork();
|
||||||
auto& gui = engine.getGUI();
|
auto& gui = engine.getGUI();
|
||||||
|
|
@ -69,9 +67,24 @@ std::shared_ptr<UINode> create_debug_panel(
|
||||||
|
|
||||||
static int fps = 0;
|
static int fps = 0;
|
||||||
static int fpsMin = fps;
|
static int fpsMin = fps;
|
||||||
|
static int fpsMinOld = fpsMin;
|
||||||
static int fpsMax = fps;
|
static int fpsMax = fps;
|
||||||
|
static int fpsMaxOld = fpsMax;
|
||||||
|
static int framesCount = 0;
|
||||||
|
static float deltaSum = 0.;
|
||||||
|
static float fpsAvgLong = fps;
|
||||||
static std::wstring fpsString = L"";
|
static std::wstring fpsString = L"";
|
||||||
|
|
||||||
|
static int drawCalls = 0;
|
||||||
|
static int drawCallsMin = drawCalls;
|
||||||
|
static int drawCallsMinOld = drawCallsMin;
|
||||||
|
static int drawCallsMax = drawCalls;
|
||||||
|
static int drawCallsMaxOld = drawCallsMax;
|
||||||
|
static float drawCallsAvgLong = drawCalls;
|
||||||
|
static std::wstring drawCallsString = L"";
|
||||||
|
|
||||||
|
static const float AVG_ALPHA = 0.3;
|
||||||
|
|
||||||
static size_t lastTotalDownload = 0;
|
static size_t lastTotalDownload = 0;
|
||||||
static size_t lastTotalUpload = 0;
|
static size_t lastTotalUpload = 0;
|
||||||
static std::wstring netSpeedString = L"";
|
static std::wstring netSpeedString = L"";
|
||||||
|
|
@ -80,12 +93,37 @@ std::shared_ptr<UINode> create_debug_panel(
|
||||||
fps = 1.0f / engine.getTime().getDelta();
|
fps = 1.0f / engine.getTime().getDelta();
|
||||||
fpsMin = std::min(fps, fpsMin);
|
fpsMin = std::min(fps, fpsMin);
|
||||||
fpsMax = std::max(fps, fpsMax);
|
fpsMax = std::max(fps, fpsMax);
|
||||||
|
framesCount++;
|
||||||
|
deltaSum += engine.getTime().getDelta();
|
||||||
|
|
||||||
|
drawCallsMin = std::min(drawCalls, drawCallsMin);
|
||||||
|
drawCallsMax = std::max(drawCalls, drawCallsMax);
|
||||||
|
drawCallsAvgLong =
|
||||||
|
drawCallsAvgLong * (1 - AVG_ALPHA) + drawCalls * AVG_ALPHA;
|
||||||
});
|
});
|
||||||
|
|
||||||
panel->listenInterval(0.5f, []() {
|
panel->listenInterval(0.2f, []() {
|
||||||
fpsString = std::to_wstring(fpsMax)+L" / "+std::to_wstring(fpsMin);
|
if (framesCount < 1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
fpsAvgLong = framesCount / deltaSum;
|
||||||
|
framesCount = 0;
|
||||||
|
deltaSum = 0.0;
|
||||||
|
|
||||||
|
fpsString = std::to_wstring(int(fpsAvgLong));
|
||||||
|
drawCallsString = std::to_wstring(int(drawCallsAvgLong));
|
||||||
|
});
|
||||||
|
|
||||||
|
panel->listenInterval(2.0f, []() {
|
||||||
|
fpsMinOld = fpsMin;
|
||||||
fpsMin = fps;
|
fpsMin = fps;
|
||||||
|
fpsMaxOld = fpsMax;
|
||||||
fpsMax = fps;
|
fpsMax = fps;
|
||||||
|
|
||||||
|
drawCallsMinOld = drawCallsMin;
|
||||||
|
drawCallsMin = drawCalls;
|
||||||
|
drawCallsMaxOld = drawCallsMax;
|
||||||
|
drawCallsMax = drawCalls;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (network) {
|
if (network) {
|
||||||
|
|
@ -93,30 +131,44 @@ std::shared_ptr<UINode> create_debug_panel(
|
||||||
size_t totalDownload = network->getTotalDownload();
|
size_t totalDownload = network->getTotalDownload();
|
||||||
size_t totalUpload = network->getTotalUpload();
|
size_t totalUpload = network->getTotalUpload();
|
||||||
netSpeedString =
|
netSpeedString =
|
||||||
L"download: " + std::to_wstring(totalDownload - lastTotalDownload) +
|
L"download: " +
|
||||||
L" B/s upload: " + std::to_wstring(totalUpload - lastTotalUpload) +
|
std::to_wstring(totalDownload - lastTotalDownload) +
|
||||||
L" B/s";
|
L" B/s upload: " +
|
||||||
|
std::to_wstring(totalUpload - lastTotalUpload) + L" B/s";
|
||||||
lastTotalDownload = totalDownload;
|
lastTotalDownload = totalDownload;
|
||||||
lastTotalUpload = totalUpload;
|
lastTotalUpload = totalUpload;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
panel->add(create_label(gui, []() { return L"fps: "+fpsString;}));
|
panel->add(create_label(gui, []() {
|
||||||
|
return L"fps: " + fpsString + L" / " +
|
||||||
|
std::to_wstring(std::min(fpsMinOld, fpsMin)) + L" / " +
|
||||||
|
std::to_wstring(std::max(fpsMaxOld, fpsMax));
|
||||||
|
}));
|
||||||
panel->add(create_label(gui, []() {
|
panel->add(create_label(gui, []() {
|
||||||
return L"meshes: " + std::to_wstring(MeshStats::meshesCount);
|
return L"meshes: " + std::to_wstring(MeshStats::meshesCount);
|
||||||
}));
|
}));
|
||||||
panel->add(create_label(gui, []() {
|
panel->add(create_label(gui, []() {
|
||||||
int drawCalls = MeshStats::drawCalls;
|
drawCalls = MeshStats::drawCalls;
|
||||||
MeshStats::drawCalls = 0;
|
MeshStats::drawCalls = 0;
|
||||||
return L"draw-calls: " + std::to_wstring(drawCalls);
|
auto drawCallsStr = std::to_wstring(drawCalls);
|
||||||
|
drawCallsStr.resize(6, ' ');
|
||||||
|
return L"draw-calls: " + drawCallsStr +
|
||||||
|
L" ( avg: " + drawCallsString + L" )";
|
||||||
}));
|
}));
|
||||||
panel->add(create_label(gui, []() {
|
panel->add(create_label(gui, []() {
|
||||||
return L"speakers: " + std::to_wstring(audio::count_speakers())+
|
return L" min/max: " +
|
||||||
|
std::to_wstring(std::min(drawCallsMinOld, drawCallsMin)) +
|
||||||
|
L" / " +
|
||||||
|
std::to_wstring(std::max(drawCallsMaxOld, drawCallsMax));
|
||||||
|
}));
|
||||||
|
panel->add(create_label(gui, []() {
|
||||||
|
return L"speakers: " + std::to_wstring(audio::count_speakers()) +
|
||||||
L" streams: " + std::to_wstring(audio::count_streams());
|
L" streams: " + std::to_wstring(audio::count_streams());
|
||||||
}));
|
}));
|
||||||
panel->add(create_label(gui, []() {
|
panel->add(create_label(gui, []() {
|
||||||
return L"lua-stack: " + std::to_wstring(scripting::get_values_on_stack());
|
return L"lua-stack: " +
|
||||||
|
std::to_wstring(scripting::get_values_on_stack());
|
||||||
}));
|
}));
|
||||||
if (network) {
|
if (network) {
|
||||||
panel->add(create_label(gui, []() { return netSpeedString; }));
|
panel->add(create_label(gui, []() { return netSpeedString; }));
|
||||||
|
|
@ -124,7 +176,7 @@ std::shared_ptr<UINode> create_debug_panel(
|
||||||
panel->add(create_label(gui, [&engine]() {
|
panel->add(create_label(gui, [&engine]() {
|
||||||
auto& settings = engine.getSettings();
|
auto& settings = engine.getSettings();
|
||||||
bool culling = settings.graphics.frustumCulling.get();
|
bool culling = settings.graphics.frustumCulling.get();
|
||||||
return L"frustum-culling: "+std::wstring(culling ? L"on" : L"off");
|
return L"frustum-culling: " + std::wstring(culling ? L"on" : L"off");
|
||||||
}));
|
}));
|
||||||
panel->add(create_label(gui, [=]() {
|
panel->add(create_label(gui, [=]() {
|
||||||
return L"particles: " +
|
return L"particles: " +
|
||||||
|
|
@ -133,16 +185,16 @@ std::shared_ptr<UINode> create_debug_panel(
|
||||||
std::to_wstring(ParticlesRenderer::aliveEmitters);
|
std::to_wstring(ParticlesRenderer::aliveEmitters);
|
||||||
}));
|
}));
|
||||||
panel->add(create_label(gui, [&]() {
|
panel->add(create_label(gui, [&]() {
|
||||||
return L"chunks: "+std::to_wstring(level.chunks->size())+
|
return L"chunks: " + std::to_wstring(level.chunks->size()) +
|
||||||
L" visible: "+std::to_wstring(ChunksRenderer::visibleChunks);
|
L" visible: " + std::to_wstring(ChunksRenderer::visibleChunks);
|
||||||
}));
|
}));
|
||||||
panel->add(create_label(gui, [&]() {
|
panel->add(create_label(gui, [&]() {
|
||||||
return L"entities: "+std::to_wstring(level.entities->size())+L" next: "+
|
return L"entities: " + std::to_wstring(level.entities->size()) +
|
||||||
std::to_wstring(level.entities->peekNextID());
|
L" next: " + std::to_wstring(level.entities->peekNextID());
|
||||||
}));
|
}));
|
||||||
panel->add(create_label(gui, [&]() {
|
panel->add(create_label(gui, [&]() {
|
||||||
return L"players: "+std::to_wstring(level.players->size())+L" local: "+
|
return L"players: " + std::to_wstring(level.players->size()) +
|
||||||
std::to_wstring(player.getId());
|
L" local: " + std::to_wstring(player.getId());
|
||||||
}));
|
}));
|
||||||
panel->add(create_label(gui, [&]() -> std::wstring {
|
panel->add(create_label(gui, [&]() -> std::wstring {
|
||||||
// TODO: move to xml finally
|
// TODO: move to xml finally
|
||||||
|
|
@ -156,14 +208,13 @@ std::shared_ptr<UINode> create_debug_panel(
|
||||||
}
|
}
|
||||||
|
|
||||||
std::wstringstream stream;
|
std::wstringstream stream;
|
||||||
stream << "r:" << vox.state.rotation << " s:"
|
stream << "r:" << vox.state.rotation
|
||||||
<< std::bitset<3>(vox.state.segment) << " u:"
|
<< " s:" << std::bitset<3>(vox.state.segment)
|
||||||
<< std::bitset<8>(vox.state.userbits);
|
<< " u:" << std::bitset<8>(vox.state.userbits);
|
||||||
if (vox.id == BLOCK_VOID) {
|
if (vox.id == BLOCK_VOID) {
|
||||||
return L"block: -";
|
return L"block: -";
|
||||||
} else {
|
} else {
|
||||||
return L"block: "+std::to_wstring(vox.id)+
|
return L"block: " + std::to_wstring(vox.id) + L" " + stream.str();
|
||||||
L" "+stream.str();
|
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
panel->add(create_label(gui, [&]() -> std::wstring {
|
panel->add(create_label(gui, [&]() -> std::wstring {
|
||||||
|
|
@ -181,9 +232,9 @@ std::shared_ptr<UINode> create_debug_panel(
|
||||||
if (vox.id == BLOCK_VOID) {
|
if (vox.id == BLOCK_VOID) {
|
||||||
return L"x: - y: - z: -";
|
return L"x: - y: - z: -";
|
||||||
}
|
}
|
||||||
return L"x: " + std::to_wstring(selection.actualPosition.x) +
|
return L"x: " + std::to_wstring(selection.actualPosition.x) + L" y: " +
|
||||||
L" y: " + std::to_wstring(selection.actualPosition.y) +
|
std::to_wstring(selection.actualPosition.y) + L" z: " +
|
||||||
L" z: " + std::to_wstring(selection.actualPosition.z);
|
std::to_wstring(selection.actualPosition.z);
|
||||||
}));
|
}));
|
||||||
panel->add(create_label(gui, [&]() {
|
panel->add(create_label(gui, [&]() {
|
||||||
// TODO: move to xml finally
|
// TODO: move to xml finally
|
||||||
|
|
@ -199,13 +250,13 @@ std::shared_ptr<UINode> create_debug_panel(
|
||||||
if (eid == ENTITY_NONE) {
|
if (eid == ENTITY_NONE) {
|
||||||
return std::wstring {L"entity: -"};
|
return std::wstring {L"entity: -"};
|
||||||
} else if (auto entity = level.entities->get(eid)) {
|
} else if (auto entity = level.entities->get(eid)) {
|
||||||
return L"entity: "+util::str2wstr_utf8(entity->getDef().name)+
|
return L"entity: " + util::str2wstr_utf8(entity->getDef().name) +
|
||||||
L" uid: "+std::to_wstring(entity->getUID());
|
L" uid: " + std::to_wstring(entity->getUID());
|
||||||
} else {
|
} else {
|
||||||
return std::wstring {L"entity: error (invalid UID)"};
|
return std::wstring {L"entity: error (invalid UID)"};
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
panel->add(create_label(gui, [&](){
|
panel->add(create_label(gui, [&]() {
|
||||||
auto indices = level.content.getIndices();
|
auto indices = level.content.getIndices();
|
||||||
if (auto def = indices->blocks.get(player.selection.vox.id)) {
|
if (auto def = indices->blocks.get(player.selection.vox.id)) {
|
||||||
return L"name: " + util::str2wstr_utf8(def->name);
|
return L"name: " + util::str2wstr_utf8(def->name);
|
||||||
|
|
@ -213,8 +264,8 @@ std::shared_ptr<UINode> create_debug_panel(
|
||||||
return std::wstring {L"name: void"};
|
return std::wstring {L"name: void"};
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
panel->add(create_label(gui, [&](){
|
panel->add(create_label(gui, [&]() {
|
||||||
return L"seed: "+std::to_wstring(level.getWorld()->getSeed());
|
return L"seed: " + std::to_wstring(level.getWorld()->getSeed());
|
||||||
}));
|
}));
|
||||||
|
|
||||||
for (int ax = 0; ax < 3; ax++) {
|
for (int ax = 0; ax < 3; ax++) {
|
||||||
|
|
@ -240,7 +291,7 @@ std::shared_ptr<UINode> create_debug_panel(
|
||||||
glm::vec3 position = player.getPosition();
|
glm::vec3 position = player.getPosition();
|
||||||
position[ax] = std::stoi(text);
|
position[ax] = std::stoi(text);
|
||||||
player.teleport(position);
|
player.teleport(position);
|
||||||
} catch (std::exception& _){
|
} catch (std::exception& _) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -255,25 +306,25 @@ std::shared_ptr<UINode> create_debug_panel(
|
||||||
panel->add(sub);
|
panel->add(sub);
|
||||||
}
|
}
|
||||||
auto& worldInfo = level.getWorld()->getInfo();
|
auto& worldInfo = level.getWorld()->getInfo();
|
||||||
panel->add(create_label(gui, [&](){
|
panel->add(create_label(gui, [&]() {
|
||||||
int hour, minute, second;
|
int hour, minute, second;
|
||||||
timeutil::from_value(worldInfo.daytime, hour, minute, second);
|
timeutil::from_value(worldInfo.daytime, hour, minute, second);
|
||||||
|
|
||||||
std::wstring timeString =
|
std::wstring timeString = util::lfill(std::to_wstring(hour), 2, L'0') +
|
||||||
util::lfill(std::to_wstring(hour), 2, L'0') + L":" +
|
L":" +
|
||||||
util::lfill(std::to_wstring(minute), 2, L'0');
|
util::lfill(std::to_wstring(minute), 2, L'0');
|
||||||
return L"time: "+timeString;
|
return L"time: " + timeString;
|
||||||
}));
|
}));
|
||||||
if (allowDebugCheats) {
|
if (allowDebugCheats) {
|
||||||
auto bar = std::make_shared<TrackBar>(gui, 0.0f, 1.0f, 1.0f, 0.005f, 8);
|
auto bar = std::make_shared<TrackBar>(gui, 0.0f, 1.0f, 1.0f, 0.005f, 8);
|
||||||
bar->setSupplier([&]() {return worldInfo.daytime;});
|
bar->setSupplier([&]() { return worldInfo.daytime; });
|
||||||
bar->setConsumer([&](double val) {worldInfo.daytime = val;});
|
bar->setConsumer([&](double val) { worldInfo.daytime = val; });
|
||||||
panel->add(bar);
|
panel->add(bar);
|
||||||
}
|
}
|
||||||
if (allowDebugCheats) {
|
if (allowDebugCheats) {
|
||||||
auto bar = std::make_shared<TrackBar>(gui, 0.0f, 1.0f, 0.0f, 0.005f, 8);
|
auto bar = std::make_shared<TrackBar>(gui, 0.0f, 1.0f, 0.0f, 0.005f, 8);
|
||||||
bar->setSupplier([&]() {return worldInfo.fog;});
|
bar->setSupplier([&]() { return worldInfo.fog; });
|
||||||
bar->setConsumer([&](double val) {worldInfo.fog = val;});
|
bar->setConsumer([&](double val) { worldInfo.fog = val; });
|
||||||
panel->add(bar);
|
panel->add(bar);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
@ -304,9 +355,7 @@ std::shared_ptr<UINode> create_debug_panel(
|
||||||
auto checkbox = std::make_shared<FullCheckBox>(
|
auto checkbox = std::make_shared<FullCheckBox>(
|
||||||
gui, L"Show Paths", glm::vec2(400, 24)
|
gui, L"Show Paths", glm::vec2(400, 24)
|
||||||
);
|
);
|
||||||
checkbox->setSupplier([=]() {
|
checkbox->setSupplier([=]() { return DebugLinesRenderer::showPaths; });
|
||||||
return DebugLinesRenderer::showPaths;
|
|
||||||
});
|
|
||||||
checkbox->setConsumer([=](bool checked) {
|
checkbox->setConsumer([=](bool checked) {
|
||||||
DebugLinesRenderer::showPaths = checked;
|
DebugLinesRenderer::showPaths = checked;
|
||||||
});
|
});
|
||||||
|
|
@ -316,9 +365,7 @@ std::shared_ptr<UINode> create_debug_panel(
|
||||||
auto checkbox = std::make_shared<FullCheckBox>(
|
auto checkbox = std::make_shared<FullCheckBox>(
|
||||||
gui, L"Show Generator Minimap", glm::vec2(400, 24)
|
gui, L"Show Generator Minimap", glm::vec2(400, 24)
|
||||||
);
|
);
|
||||||
checkbox->setSupplier([=]() {
|
checkbox->setSupplier([=]() { return Hud::showGeneratorMinimap; });
|
||||||
return Hud::showGeneratorMinimap;
|
|
||||||
});
|
|
||||||
checkbox->setConsumer([=](bool checked) {
|
checkbox->setConsumer([=](bool checked) {
|
||||||
Hud::showGeneratorMinimap = checked;
|
Hud::showGeneratorMinimap = checked;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue