Oxygen Engine
Modern C++ 3D Engine using OpenGL
Loading...
Searching...
No Matches
slider.h
1#ifndef OE_GUI_COMPONENT_SLIDER_H
2#define OE_GUI_COMPONENT_SLIDER_H
3
4#include "../component.h"
5#include <functional>
6
7namespace oe::gui::component
8{
9 class Slider : public Component
10 {
11 public:
12 Slider(float value, const float& min = .0, const float& max = 100., const float& step = 1., std::function<void()> on_change = []{});
13
14 void bindValueToPointer(float* value);
15
16 void generate();
17 private:
18 float _value;
19 float *_ptr_value;
20 float _min;
21 float _max;
22 float _step;
23
24 std::function<void()> _on_change;
25 };
26}
27#endif
Definition component.h:22
T * createChild(Args &&... args)
Definition component.h:64
Definition slider.h:10
UI components.
Definition component.h:15