⚠️ This documentation corresponds to the latest development branch of axmol. It might diverge from the official releases.

Axmol Engine 3.0.0-dff292a
Loading...
Searching...
No Matches
RichElementImage Class Reference

Rich element for displaying images. More...

#include <UIRichText.h>

Inherits RichElement.

Public Member Functions

 RichElementImage ()
 Default constructor.
bool init (int tag, const Color32 &color, std::string_view filePath, std::string_view url="", Widget::TextureResType texType=Widget::TextureResType::LOCAL, std::string_view id=""sv)
 Initialize a RichElementImage with various arguments.
Public Member Functions inherited from RichElement
bool init (int tag, const Color32 &color)
 Initialize a rich element with different arguments.
Public Member Functions inherited from Object
void retain ()
 Retains the ownership.
void release ()
 Releases the ownership immediately.
Objectautorelease ()
 Releases the ownership sometime soon automatically.
unsigned int getReferenceCount () const
 Returns the Object's current reference count.
virtual ~Object ()
 Destructor.

Static Public Member Functions

static RichElementImagecreate (int tag, const Color32 &color, std::string_view filePath, std::string_view url="", Widget::TextureResType texType=Widget::TextureResType::LOCAL, std::string_view id=""sv)
 Create a RichElementImage with various arguments.

Additional Inherited Members

Public Types inherited from RichElement
enum class  Type { TEXT , IMAGE , CUSTOM , NEWLINE }
 Rich element type. More...
Public Attributes inherited from Object
unsigned int _ID
 object id, ScriptSupport need public _ID
int _luaID
 Lua reference id.

Detailed Description

Rich element for displaying images.

Constructor & Destructor Documentation

◆ RichElementImage()

RichElementImage ( )
inline

Default constructor.

@lua new

Member Function Documentation

◆ init()

bool init ( int tag,
const Color32 & color,
std::string_view filePath,
std::string_view url = "",
Widget::TextureResType texType = Widget::TextureResType::LOCAL,
std::string_view id = ""sv )

Initialize a RichElementImage with various arguments.

Parameters
tagA integer tag value.
colorA color in Color32.
filePathA image file name.
urluniform resource locator
texTypetexture type, may be a valid file path, or a sprite frame name
idID of element
Returns
True if initialize success, false otherwise.

◆ create()

RichElementImage * create ( int tag,
const Color32 & color,
std::string_view filePath,
std::string_view url = "",
Widget::TextureResType texType = Widget::TextureResType::LOCAL,
std::string_view id = ""sv )
static

Create a RichElementImage with various arguments.

Parameters
tagA integer tag value.
colorA color in Color32.
filePathA image file name.
urluniform resource locator
texTypetexture type, may be a valid file path, or a sprite frame name
idID of element
Returns
A RichElementImage instance.

The documentation for this class was generated from the following file:
  • UIRichText.h