25 #include "eng3d/ui/numeric_input.hpp"
26 #include "eng3d/ui/widget.hpp"
27 #include "eng3d/ui/group.hpp"
28 #include "eng3d/ui/input.hpp"
29 #include "eng3d/ui/button.hpp"
32 :
Group(_x, _y, _w, _h, _parent)
34 inp = &this->make_widget<UI::Input>(0, 0,
width - 32 - 32,
height);
42 float val = atof(p->inp->get_buffer().c_str()) + 1.f;
44 snprintf(tmpbuf, 100,
"%.2f", val);
45 p->set_buffer(tmpbuf);
53 float val = atof(p->get_buffer().c_str()) + 1.f;
55 snprintf(tmpbuf, 100,
"%.2f", val);
56 p->set_buffer(tmpbuf);
61 inp->set_buffer(_buffer);
65 return inp->get_buffer();
Grouping to keep widgets together without triggering events.