aboutsummaryrefslogtreecommitdiff
path: root/src/graphics
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-07-25 15:00:46 +0200
committerdec05eba <dec05eba@protonmail.com>2024-07-25 15:00:46 +0200
commitde91c23dd50748bdb6e13562b601784a83b64cb9 (patch)
tree6347b370d2a2b9954a049ef0ba55e351aafa9d23 /src/graphics
parentfd15a6947741c997072df8b1ddf93cefc416c838 (diff)
Update to latest mgl, adds option to hide decorations on window create
Diffstat (limited to 'src/graphics')
-rw-r--r--src/graphics/Sprite.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/graphics/Sprite.cpp b/src/graphics/Sprite.cpp
index 461b14c..f2ba460 100644
--- a/src/graphics/Sprite.cpp
+++ b/src/graphics/Sprite.cpp
@@ -50,10 +50,11 @@ namespace mgl {
}
void Sprite::set_size(vec2f size) {
- if(texture)
- set_scale({ size.x / (float)texture->get_size().x, size.y / (float)texture->get_size().y });
- else
- set_scale({ 0.0f, 0.0f });
+ mgl_sprite_set_size(&sprite, *(mgl_vec2f*)&size);
+ }
+
+ void Sprite::set_height(float height) {
+ mgl_sprite_set_height(&sprite, height);
}
void Sprite::set_rotation(float degrees) {