aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-08-11 01:07:19 +0200
committerdec05eba <dec05eba@protonmail.com>2024-08-11 01:07:19 +0200
commit1b2e308b51fe2d1cebce4f170837a7c08d375484 (patch)
treee1404a2f91d2306d9952e13a36fbad0c1144b1a4
parent66d126f824bc755bad042e1cb94c1d79a3203c97 (diff)
fix incorrect sprite_set_height, add sprite_set_width
m---------depends/mgl0
-rw-r--r--include/mglpp/graphics/Sprite.hpp1
-rw-r--r--src/graphics/Sprite.cpp4
3 files changed, 5 insertions, 0 deletions
diff --git a/depends/mgl b/depends/mgl
-Subproject 1de5e22423bee66769966f21a4c256a0011aba8
+Subproject f680ab5c3798b730e2e4efb7363ca15074e0499
diff --git a/include/mglpp/graphics/Sprite.hpp b/include/mglpp/graphics/Sprite.hpp
index 67f7cad..6fc7938 100644
--- a/include/mglpp/graphics/Sprite.hpp
+++ b/include/mglpp/graphics/Sprite.hpp
@@ -25,6 +25,7 @@ namespace mgl {
void set_scale(vec2f scale);
void set_scale(float scale);
void set_size(vec2f size);
+ void set_width(float width);
void set_height(float height);
void set_rotation(float degrees);
void set_origin(vec2f origin);
diff --git a/src/graphics/Sprite.cpp b/src/graphics/Sprite.cpp
index de9e96c..4d5d181 100644
--- a/src/graphics/Sprite.cpp
+++ b/src/graphics/Sprite.cpp
@@ -51,6 +51,10 @@ namespace mgl {
mgl_sprite_set_size(&sprite, *(mgl_vec2f*)&size);
}
+ void Sprite::set_width(float width) {
+ mgl_sprite_set_width(&sprite, width);
+ }
+
void Sprite::set_height(float height) {
mgl_sprite_set_height(&sprite, height);
}