diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-03-30 16:16:51 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-03-30 16:16:51 +0200 |
commit | 889efe51b26d505171d132097ac77a14ade5a101 (patch) | |
tree | 0a4233cdb4270a3c2ab54184f43b7344eb660a5b /include/gui/Widget.hpp | |
parent | 44b986c762815874ccfb636152ae452ecba48764 (diff) |
Initial commit, showing ui above target window
Diffstat (limited to 'include/gui/Widget.hpp')
-rw-r--r-- | include/gui/Widget.hpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/gui/Widget.hpp b/include/gui/Widget.hpp new file mode 100644 index 0000000..cf81d69 --- /dev/null +++ b/include/gui/Widget.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include <mglpp/system/vec.hpp> + +namespace mgl { + class Event; + class Window; +} + +namespace gsr { + class Widget { + public: + virtual ~Widget() = default; + + virtual void on_event(mgl::Event &event, mgl::Window &window) = 0; + virtual void draw(mgl::Window &window) = 0; + virtual void set_position(mgl::vec2f position); + protected: + mgl::vec2f position; + }; +}
\ No newline at end of file |