aboutsummaryrefslogtreecommitdiff
path: root/src/gui/Widget.cpp
blob: 718fd8d308c3a6a5e72eb7a344930301b9cfaf31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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;
    }
}