⚠️ This documentation corresponds to the latest development branch of axmol. It might diverge from the official releases.
|
Axmol Engine 3.0.0-84160d4
|
Rich element for displaying text. More...
#include <UIRichText.h>
Inherits RichElement.
Public Types | |
| enum | { ITALICS_FLAG = 1 << 0 , BOLD_FLAG = 1 << 1 , UNDERLINE_FLAG = 1 << 2 , STRIKETHROUGH_FLAG = 1 << 3 , URL_FLAG = 1 << 4 , OUTLINE_FLAG = 1 << 5 , SHADOW_FLAG = 1 << 6 , GLOW_FLAG = 1 << 7 } |
| Public Types inherited from RichElement | |
| enum class | Type { TEXT , IMAGE , CUSTOM , NEWLINE } |
| Rich element type. More... | |
Public Member Functions | |
| RichElementText () | |
| Default constructor. | |
| bool | init (int tag, const Color32 &color, std::string_view text, std::string_view fontName, float fontSize, uint32_t flags, std::string_view url, const Color32 &outlineColor=Color32::WHITE, int outlineSize=-1, const Color32 &shadowColor=Color32::BLACK, const Vec2 &shadowOffset=Vec2(2.0, -2.0), int shadowBlurRadius=0, const Color32 &glowColor=Color32::WHITE, std::string_view id=""sv) |
| Initialize a RichElementText 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. | |
| Object * | autorelease () |
| 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 RichElementText * | create (int tag, const Color32 &color, std::string_view text, std::string_view fontName, float fontSize, uint32_t flags=0, std::string_view url="", const Color32 &outlineColor=Color32::WHITE, int outlineSize=-1, const Color32 &shadowColor=Color32::BLACK, const Vec2 &shadowOffset=Vec2(2.0, -2.0), int shadowBlurRadius=0, const Color32 &glowColor=Color32::WHITE, std::string_view id=""sv) |
| Create a RichElementText with various arguments. | |
Additional Inherited Members | |
| Public Attributes inherited from Object | |
| unsigned int | _ID |
| object id, ScriptSupport need public _ID | |
| int | _luaID |
| Lua reference id. | |
Rich element for displaying text.
| anonymous enum |
|
inline |
Default constructor.
@lua new
| bool init | ( | int | tag, |
| const Color32 & | color, | ||
| std::string_view | text, | ||
| std::string_view | fontName, | ||
| float | fontSize, | ||
| uint32_t | flags, | ||
| std::string_view | url, | ||
| const Color32 & | outlineColor = Color32::WHITE, | ||
| int | outlineSize = -1, | ||
| const Color32 & | shadowColor = Color32::BLACK, | ||
| const Vec2 & | shadowOffset = Vec2(2.0, -2.0), | ||
| int | shadowBlurRadius = 0, | ||
| const Color32 & | glowColor = Color32::WHITE, | ||
| std::string_view | id = ""sv ) |
Initialize a RichElementText with various arguments.
| tag | A integer tag value. |
| color | A color in Color32. |
| text | Content string. |
| fontName | Content font name. |
| fontSize | Content font size. |
| flags | italics, bold, underline, strikethrough, url, outline, shadow or glow |
| url | uniform resource locator |
| outlineColor | the color of the outline |
| outlineSize | the outline effect size value |
| shadowColor | the shadow effect color value |
| shadowOffset | shadow effect offset value |
| shadowBlurRadius | the shadow effect blur radius |
| glowColor | glow color |
| id | ID of element |
|
static |
Create a RichElementText with various arguments.
| tag | A integer tag value. |
| color | A color in Color32. |
| text | Content string. |
| fontName | Content font name. |
| fontSize | Content font size. |
| flags | italics, bold, underline, strikethrough, url, outline, shadow or glow |
| url | uniform resource locator |
| outlineColor | the color of the outline |
| outlineSize | the outline effect size value |
| shadowColor | the shadow effect color value |
| shadowOffset | shadow effect offset value |
| shadowBlurRadius | the shadow effect blur radius |
| glowColor | glow color |
| id | ID of element |