Use scissor for pages

This commit is contained in:
dec05eba
2024-08-01 22:41:07 +02:00
parent 10a5669330
commit be0ad41e74
7 changed files with 50 additions and 17 deletions

View File

@@ -5,11 +5,15 @@
namespace gsr {
class StaticPage : public Page {
public:
StaticPage() = default;
StaticPage(mgl::vec2f size);
StaticPage(const StaticPage&) = delete;
StaticPage& operator=(const StaticPage&) = 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:
mgl::vec2f size;
};
}