diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-09-25 17:29:17 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-09-25 17:29:17 +0200 |
commit | 497217a3e09b577f650aaf503356588515067ca8 (patch) | |
tree | 2fd43b747957510c55d66caf81df30732c39c398 /src/gui/Widget.cpp | |
parent | 663a36df4aaea583e7cd56ad35b26d05f6151746 (diff) |
widgets
Diffstat (limited to 'src/gui/Widget.cpp')
-rw-r--r-- | src/gui/Widget.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/Widget.cpp b/src/gui/Widget.cpp index c30c1d1..718fd8d 100644 --- a/src/gui/Widget.cpp +++ b/src/gui/Widget.cpp @@ -1,7 +1,20 @@ #include "../../include/gui/Widget.hpp" +#include "../../include/gui/WidgetContainer.hpp" namespace gsr { + Widget::Widget() { + WidgetContainer::get_instance().add_widget(this); + } + + Widget::~Widget() { + WidgetContainer::get_instance().remove_widget(this); + } + void Widget::set_position(mgl::vec2f position) { this->position = position; } + + mgl::vec2f Widget::get_position() const { + return position; + } }
\ No newline at end of file |