From fbbcac14eb9a785075355a385a2da4a68117b87f Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 5 Feb 2025 18:25:25 +0100 Subject: Add Window::set_scissor and Window::get_scissor --- include/mglpp/window/Window.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') 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; -- cgit v1.2.3