Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
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)
 
virtual void draw () override
 
void setTexture (video::ITexture *texture)
 
video::ITexture * getTexture () const
 
void setMiddleRect (const core::rect< s32 > &middle)
 
core::rect< s32 > getMiddleRect () const
 
void setFrameDuration (u64 duration)
 
u64 getFrameDuration () const
 
void setFrameCount (s32 count)
 
s32 getFrameCount () const
 
void setFrameIndex (s32 frame)
 
s32 getFrameIndex () const
 

Private Attributes

video::ITexture * m_texture = nullptr
 
u64 m_global_time = 0
 
s32 m_frame_idx = 0
 
s32 m_frame_count = 1
 
u64 m_frame_duration = 0
 
u64 m_frame_time = 0
 
core::rect< s32 > m_middle
 

Constructor & Destructor Documentation

◆ GUIAnimatedImage()

GUIAnimatedImage::GUIAnimatedImage ( gui::IGUIEnvironment * env,
gui::IGUIElement * parent,
s32 id,
const core::rect< s32 > & rectangle )

Member Function Documentation

◆ draw()

void GUIAnimatedImage::draw ( )
overridevirtual

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

+ Here is the call graph for this function:

◆ getFrameCount()

s32 GUIAnimatedImage::getFrameCount ( ) const
inline

References m_frame_count.

◆ getFrameDuration()

u64 GUIAnimatedImage::getFrameDuration ( ) const
inline

References m_frame_duration.

◆ getFrameIndex()

s32 GUIAnimatedImage::getFrameIndex ( ) const
inline

References m_frame_idx.

Referenced by GUIFormSpecMenu::acceptInput().

+ Here is the caller graph for this function:

◆ getMiddleRect()

core::rect< s32 > GUIAnimatedImage::getMiddleRect ( ) const
inline

References m_middle.

◆ getTexture()

video::ITexture * GUIAnimatedImage::getTexture ( ) const
inline

References m_texture.

◆ setFrameCount()

void GUIAnimatedImage::setFrameCount ( s32 count)
inline

References m_frame_count.

Referenced by GUIFormSpecMenu::parseAnimatedImage().

+ Here is the caller graph for this function:

◆ setFrameDuration()

void GUIAnimatedImage::setFrameDuration ( u64 duration)
inline

References m_frame_duration.

Referenced by GUIFormSpecMenu::parseAnimatedImage().

+ Here is the caller graph for this function:

◆ setFrameIndex()

void GUIAnimatedImage::setFrameIndex ( s32 frame)
inline

References m_frame_idx.

Referenced by GUIFormSpecMenu::parseAnimatedImage().

+ Here is the caller graph for this function:

◆ setMiddleRect()

void GUIAnimatedImage::setMiddleRect ( const core::rect< s32 > & middle)
inline

References m_middle.

Referenced by GUIFormSpecMenu::parseAnimatedImage(), and GUIFormSpecMenu::parseImage().

+ Here is the caller graph for this function:

◆ setTexture()

void GUIAnimatedImage::setTexture ( video::ITexture * texture)
inline

References m_texture.

Referenced by GUIFormSpecMenu::parseAnimatedImage(), and GUIFormSpecMenu::parseImage().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_frame_count

s32 GUIAnimatedImage::m_frame_count = 1
private

Referenced by draw(), getFrameCount(), and setFrameCount().

◆ m_frame_duration

u64 GUIAnimatedImage::m_frame_duration = 0
private

◆ 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_middle

core::rect<s32> GUIAnimatedImage::m_middle
private

Referenced by draw(), getMiddleRect(), and setMiddleRect().

◆ m_texture

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

Referenced by draw(), getTexture(), and setTexture().


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