Oxygen Engine
Modern C++ 3D Engine using OpenGL
Loading...
Searching...
No Matches
checkbox.h
1#ifndef OE_GUI_COMPONENT_CHECKBOX_H
2#define OE_GUI_COMPONENT_CHECKBOX_H
3
4#include "../component.h"
5
6namespace oe::gui::component
7{
8 class Checkbox : public Component
9 {
10 public:
11 Checkbox(const std::string& label, bool* checked);
12
13 Checkbox* setLabel(const std::string& label) { _label = label; return this; }
14
15 // setOnClick(std::function<void(const bool&)>),
16
17 void generate();
18 private:
19 bool *_checked;
20 std::string _label;
21 std::function<void()> _on_click;
22 };
23}
24#endif
Definition component.h:22
T * createChild(Args &&... args)
Definition component.h:64
Definition checkbox.h:9
UI components.
Definition component.h:15