add 'Show Generator Minimap' checkbox
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include "delegates.hpp"
|
||||
#include "engine.hpp"
|
||||
#include "settings.hpp"
|
||||
#include "hud.hpp"
|
||||
#include "content/Content.hpp"
|
||||
#include "graphics/core/Mesh.hpp"
|
||||
#include "graphics/ui/elements/CheckBox.hpp"
|
||||
@@ -37,6 +38,7 @@ static std::shared_ptr<Label> create_label(wstringsupplier supplier) {
|
||||
}
|
||||
|
||||
// TODO: move to xml
|
||||
// TODO: move to xml finally
|
||||
std::shared_ptr<UINode> create_debug_panel(
|
||||
Engine* engine,
|
||||
Level* level,
|
||||
@@ -213,6 +215,18 @@ std::shared_ptr<UINode> create_debug_panel(
|
||||
});
|
||||
panel->add(checkbox);
|
||||
}
|
||||
{
|
||||
auto checkbox = std::make_shared<FullCheckBox>(
|
||||
L"Show Generator Minimap", glm::vec2(400, 24)
|
||||
);
|
||||
checkbox->setSupplier([=]() {
|
||||
return Hud::showGeneratorMinimap;
|
||||
});
|
||||
checkbox->setConsumer([=](bool checked) {
|
||||
Hud::showGeneratorMinimap = checked;
|
||||
});
|
||||
panel->add(checkbox);
|
||||
}
|
||||
panel->refresh();
|
||||
return panel;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user