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