mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
Add animated_image[] formspec element (#9258)
This commit is contained in:
parent
ee7d357602
commit
7ce21788f8
11 changed files with 200 additions and 4 deletions
26
src/gui/guiAnimatedImage.h
Normal file
26
src/gui/guiAnimatedImage.h
Normal file
|
@ -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;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue