diff options
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 |