Rich element for displaying text. More...
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 | Type { TEXT, IMAGE, CUSTOM, NEWLINE } |
| Rich element type. More... | |
Public Member Functions | |
| RichElementText () | |
| Default constructor. More... | |
| virtual | ~RichElementText () |
| Default destructor. More... | |
| bool | init (int tag, const Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags, const std::string &url, const Color3B &outlineColor=Color3B::WHITE, int outlineSize=-1, const Color3B &shadowColor=Color3B::BLACK, const cocos2d::Size &shadowOffset=Size(2.0, -2.0), int shadowBlurRadius=0, const Color3B &glowColor=Color3B::WHITE) |
| Initialize a RichElementText with various arguments. More... | |
Public Member Functions inherited from RichElement | |
| RichElement () | |
| Default constructor. More... | |
| virtual | ~RichElement () |
| Default destructor. More... | |
| bool | init (int tag, const Color3B &color, uint8_t opacity) |
| Initialize a rich element with different arguments. More... | |
Public Member Functions inherited from Ref | |
| void | retain () |
| Retains the ownership. More... | |
| void | release () |
| Releases the ownership immediately. More... | |
| Ref * | autorelease () |
| Releases the ownership sometime soon automatically. More... | |
| unsigned int | getReferenceCount () const |
| Returns the Ref's current reference count. More... | |
| virtual | ~Ref () |
| Destructor. More... | |
Static Public Member Functions | |
| static RichElementText * | create (int tag, const Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags=0, const std::string &url="", const Color3B &outlineColor=Color3B::WHITE, int outlineSize=-1, const Color3B &shadowColor=Color3B::BLACK, const cocos2d::Size &shadowOffset=Size(2.0, -2.0), int shadowBlurRadius=0, const Color3B &glowColor=Color3B::WHITE) |
| Create a RichElementText with various arguments. More... | |
Additional Inherited Members | |
Public Attributes inherited from Ref | |
| unsigned int | _ID |
| object id, ScriptSupport need public _ID | |
| int | _luaID |
| Lua reference id. | |
| void * | _scriptObject |
| scriptObject, support for swift | |
| bool | _rooted |
| When true, it means that the object was already rooted. | |
Rich element for displaying text.
| anonymous enum |
|
inline |
Default constructor.
@js ctor @lua new
|
inlinevirtual |
Default destructor.
@js NA @lua NA
| bool init | ( | int | tag, |
| const Color3B & | color, | ||
| uint8_t | opacity, | ||
| const std::string & | text, | ||
| const std::string & | fontName, | ||
| float | fontSize, | ||
| uint32_t | flags, | ||
| const std::string & | url, | ||
| const Color3B & | outlineColor = Color3B::WHITE, |
||
| int | outlineSize = -1, |
||
| const Color3B & | shadowColor = Color3B::BLACK, |
||
| const cocos2d::Size & | shadowOffset = Size(2.0, -2.0), |
||
| int | shadowBlurRadius = 0, |
||
| const Color3B & | glowColor = Color3B::WHITE |
||
| ) |
Initialize a RichElementText with various arguments.
| tag | A integer tag value. |
| color | A color in Color3B. |
| opacity | A opacity in GLubyte. |
| 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 |
|
static |
Create a RichElementText with various arguments.
| tag | A integer tag value. |
| color | A color in Color3B. |
| opacity | A opacity in GLubyte. |
| 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 |