From 7ce21788f86d489d6dc08d9b2d3f6e3f8495b64e Mon Sep 17 00:00:00 2001 From: Hugues Ross Date: Sat, 15 Feb 2020 10:33:18 -0500 Subject: Add animated_image[] formspec element (#9258) --- src/gui/guiAnimatedImage.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/gui/guiAnimatedImage.h (limited to 'src/gui/guiAnimatedImage.h') 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 &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; +}; -- cgit v1.2.3