aboutsummaryrefslogtreecommitdiff
path: root/src/gui/guiAnimatedImage.h
diff options
context:
space:
mode:
authorHugues Ross <hugues.ross@gmail.com>2020-02-15 10:33:18 -0500
committerGitHub <noreply@github.com>2020-02-15 15:33:18 +0000
commit7ce21788f86d489d6dc08d9b2d3f6e3f8495b64e (patch)
treeb3388dad101a3b6b4edee239a21bdc662071faca /src/gui/guiAnimatedImage.h
parentee7d35760242824fd6b00a6ab1d9a2e6e5873d2c (diff)
downloaddragonfireclient-7ce21788f86d489d6dc08d9b2d3f6e3f8495b64e.tar.xz
Add animated_image[] formspec element (#9258)
Diffstat (limited to 'src/gui/guiAnimatedImage.h')
-rw-r--r--src/gui/guiAnimatedImage.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/gui/guiAnimatedImage.h b/src/gui/guiAnimatedImage.h
new file mode 100644
index 000000000..8fb2977f2
--- /dev/null
+++ b/src/gui/guiAnimatedImage.h
@@ -0,0 +1,26 @@
+#pragma once
+
+#include "irrlichttypes_extrabloated.h"
+#include "util/string.h"
+
+class ISimpleTextureSource;
+
+class GUIAnimatedImage : public gui::IGUIElement {
+public:
+ GUIAnimatedImage(gui::IGUIEnvironment *env, gui::IGUIElement *parent, s32 id,
+ const core::rect<s32> &rectangle, const std::string &name,
+ ISimpleTextureSource *tsrc);
+
+ virtual void draw() override;
+
+private:
+ std::string m_name;
+ ISimpleTextureSource *m_tsrc;
+
+ video::ITexture *m_texture;
+ u64 m_global_time;
+ s32 m_frame_idx;
+ s32 m_frame_count;
+ u64 m_frame_duration;
+ u64 m_frame_time;
+};