Minetest  5.4.0
GUIAnimatedImage Class Reference

#include <guiAnimatedImage.h>

+ Inheritance diagram for GUIAnimatedImage:
+ Collaboration diagram for GUIAnimatedImage:

Public Member Functions

 GUIAnimatedImage (gui::IGUIEnvironment *env, gui::IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle, const std::string &texture_name, s32 frame_count, s32 frame_duration, ISimpleTextureSource *tsrc)
 
virtual void draw () override
 
void setFrameIndex (s32 frame)
 
s32 getFrameIndex () const
 

Private Attributes

ISimpleTextureSourcem_tsrc
 
video::ITexture * m_texture = nullptr
 
u64 m_global_time = 0
 
s32 m_frame_idx = 0
 
s32 m_frame_count = 1
 
u64 m_frame_duration = 1
 
u64 m_frame_time = 0
 

Constructor & Destructor Documentation

◆ GUIAnimatedImage()

GUIAnimatedImage::GUIAnimatedImage ( gui::IGUIEnvironment *  env,
gui::IGUIElement *  parent,
s32  id,
const core::rect< s32 > &  rectangle,
const std::string &  texture_name,
s32  frame_count,
s32  frame_duration,
ISimpleTextureSource tsrc 
)

References ISimpleTextureSource::getTexture(), m_frame_count, m_frame_duration, m_texture, and m_tsrc.

+ Here is the call graph for this function:

Member Function Documentation

◆ draw()

void GUIAnimatedImage::draw ( )
overridevirtual

References draw2DImageFilterScaled(), porting::getTimeMs(), m_frame_count, m_frame_duration, m_frame_idx, m_frame_time, m_global_time, and m_texture.

+ Here is the call graph for this function:

◆ getFrameIndex()

s32 GUIAnimatedImage::getFrameIndex ( ) const
inline

References m_frame_idx.

Referenced by GUIFormSpecMenu::acceptInput().

+ Here is the caller graph for this function:

◆ setFrameIndex()

void GUIAnimatedImage::setFrameIndex ( s32  frame)

References idx, m_frame_count, and m_frame_idx.

Referenced by GUIFormSpecMenu::parseAnimatedImage().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_frame_count

s32 GUIAnimatedImage::m_frame_count = 1
private

◆ m_frame_duration

u64 GUIAnimatedImage::m_frame_duration = 1
private

Referenced by GUIAnimatedImage(), and draw().

◆ m_frame_idx

s32 GUIAnimatedImage::m_frame_idx = 0
private

Referenced by draw(), getFrameIndex(), and setFrameIndex().

◆ m_frame_time

u64 GUIAnimatedImage::m_frame_time = 0
private

Referenced by draw().

◆ m_global_time

u64 GUIAnimatedImage::m_global_time = 0
private

Referenced by draw().

◆ m_texture

video::ITexture* GUIAnimatedImage::m_texture = nullptr
private

Referenced by GUIAnimatedImage(), and draw().

◆ m_tsrc

ISimpleTextureSource* GUIAnimatedImage::m_tsrc
private

Referenced by GUIAnimatedImage().


The documentation for this class was generated from the following files: