added FullCheckBox

This commit is contained in:
MihailRis
2024-01-11 04:08:36 +03:00
parent b2b961552b
commit 290fec379e
4 changed files with 69 additions and 65 deletions
+2 -9
View File
@@ -146,21 +146,14 @@ void HudRenderer::createDebugPanel(Engine* engine) {
panel->add(bar);
}
{
Panel* checkpanel = new Panel(vec2(400, 32), vec4(5.0f), 1.0f);
checkpanel->color(vec4(0.0f));
checkpanel->orientation(Orientation::horizontal);
CheckBox* checkbox = new CheckBox();
auto checkbox = new FullCheckBox(L"Show Chunk Borders", vec2(400, 32));
checkbox->supplier([=]() {
return engine->getSettings().debug.showChunkBorders;
});
checkbox->consumer([=](bool checked) {
engine->getSettings().debug.showChunkBorders = checked;
});
checkpanel->add(checkbox);
checkpanel->add(new Label(L"Show Chunk Borders"));
panel->add(checkpanel);
panel->add(checkbox);
}
panel->refresh();
}