diff options
author | dec05eba <dec05eba@protonmail.com> | 2025-02-05 18:25:25 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2025-02-05 18:25:25 +0100 |
commit | fbbcac14eb9a785075355a385a2da4a68117b87f (patch) | |
tree | 9788599caad5d73ac38c5df4d75e3632493e2bf8 /include | |
parent | cd258b5f2c6b3c9e41870703e1063a79e3a6abb4 (diff) |
Add Window::set_scissor and Window::get_scissor
Diffstat (limited to 'include')
-rw-r--r-- | include/mglpp/window/Window.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/mglpp/window/Window.hpp b/include/mglpp/window/Window.hpp index 2c179a8..c2d6cff 100644 --- a/include/mglpp/window/Window.hpp +++ b/include/mglpp/window/Window.hpp @@ -27,6 +27,11 @@ namespace mgl { vec2i size; }; + struct Scissor { + vec2i position; + vec2i size; + }; + /* Return true to continue. |get_clipboard| returns false if this returns false. Note: |size| is the size of the current data, not the total data (if the callback only contains a part of the data). @@ -103,6 +108,9 @@ namespace mgl { void set_view(const View &new_view); View get_view(); + void set_scissor(const Scissor &scissor); + Scissor get_scissor(); + bool is_key_pressed(Keyboard::Key key) const; bool is_mouse_button_pressed(Mouse::Button button) const; |