#pragma once #include #include "Label.hpp" #include "Panel.hpp" namespace gui { class CheckBox final : public UINode { protected: glm::vec4 checkColor {1.0f, 1.0f, 1.0f, 0.4f}; boolsupplier supplier = nullptr; boolconsumer consumer = nullptr; bool checked = false; public: explicit CheckBox(GUI& gui, bool checked = false); void draw(const DrawContext& pctx, const Assets& assets) override; void mouseRelease(int x, int y) override; void setSupplier(boolsupplier supplier); void setConsumer(boolconsumer consumer); CheckBox* setChecked(bool flag); bool isChecked() const { if (supplier) return supplier(); return checked; } }; class FullCheckBox final : public Panel { protected: std::shared_ptr checkbox; std::shared_ptr