aboutsummaryrefslogtreecommitdiff
path: root/include/mglpp/graphics/Sprite.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mglpp/graphics/Sprite.hpp')
-rw-r--r--include/mglpp/graphics/Sprite.hpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/mglpp/graphics/Sprite.hpp b/include/mglpp/graphics/Sprite.hpp
new file mode 100644
index 0000000..8a03de5
--- /dev/null
+++ b/include/mglpp/graphics/Sprite.hpp
@@ -0,0 +1,27 @@
+#ifndef MGLPP_SPRITE_HPP
+#define MGLPP_SPRITE_HPP
+
+#include "Drawable.hpp"
+
+extern "C" {
+#include <mgl/graphics/sprite.h>
+}
+
+namespace mgl {
+ class Texture;
+ class Sprite : public Drawable {
+ public:
+ Sprite(Texture &texture, vec2f position);
+ ~Sprite();
+
+ void set_position(vec2f position) override;
+ void set_color(Color color) override;
+ protected:
+ void draw(Window &window) override;
+ private:
+ mgl_sprite sprite;
+ Texture &texture;
+ };
+}
+
+#endif /* MGLPP_SPRITE_HPP */