diff options
Diffstat (limited to 'include/gui/ScrollablePage.hpp')
-rw-r--r-- | include/gui/ScrollablePage.hpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/gui/ScrollablePage.hpp b/include/gui/ScrollablePage.hpp new file mode 100644 index 0000000..8fab62f --- /dev/null +++ b/include/gui/ScrollablePage.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include "Page.hpp" + +namespace gsr { + class ScrollablePage : public Page { + public: + ScrollablePage(mgl::vec2f size); + ScrollablePage(const ScrollablePage&) = delete; + ScrollablePage& operator=(const ScrollablePage&) = delete; + + bool on_event(mgl::Event &event, mgl::Window &window, mgl::vec2f offset) override; + void draw(mgl::Window &window, mgl::vec2f offset) override; + + mgl::vec2f get_size() const { return size; } + private: + float get_border_size(mgl::Window &window) const; + private: + mgl::vec2f size; + }; +}
\ No newline at end of file |