diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-10-19 22:22:07 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-10-19 22:22:07 +0200 |
commit | fe1588ef18163c7557d3d0a62c085f42f2abfab2 (patch) | |
tree | d73f54a47ebfe6b2d289ed42c9a738a94e6095d1 /src/graphics/Rectangle.cpp | |
parent | 6a524b46cb9c74c8d1b710c23bbc62bdafd54bb2 (diff) |
Change event layout to similar to same as sfml
Diffstat (limited to 'src/graphics/Rectangle.cpp')
-rw-r--r-- | src/graphics/Rectangle.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/graphics/Rectangle.cpp b/src/graphics/Rectangle.cpp index 17060c7..f6961f7 100644 --- a/src/graphics/Rectangle.cpp +++ b/src/graphics/Rectangle.cpp @@ -19,6 +19,14 @@ namespace mgl { rectangle.color = { color.r, color.g, color.b, color.a }; } + vec2f Rectangle::get_position() const { + return { rectangle.position.x, rectangle.position.y }; + } + + void Rectangle::set_size(vec2f size) { + rectangle.size = { size.x, size.y }; + } + void Rectangle::draw(Window&) { mgl_rectangle_draw(mgl_get_context(), &rectangle); } |