This commit is contained in:
dec05eba
2022-09-25 17:29:17 +02:00
parent 663a36df4a
commit 497217a3e0
14 changed files with 609 additions and 393 deletions

View File

@@ -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;
}
}