Rich element for displaying text.
More...
Inherits RichElement.
|
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
} |
|
enum | Type { TEXT,
IMAGE,
CUSTOM,
NEWLINE
} |
| Rich element type. More...
|
|
|
| RichElementText () |
| Default constructor.
|
|
| ctor () |
| Default constructor.
|
|
| new () |
| Default constructor.
|
|
virtual | ~RichElementText () |
| Default destructor.
|
|
bool | init (int tag, const Color3B &color, GLubyte 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...
|
|
| RichElement () |
| Default constructor.
|
|
| ctor () |
| Default constructor.
|
|
| new () |
| Default constructor.
|
|
virtual | ~RichElement () |
| Default destructor.
|
|
bool | init (int tag, const Color3B &color, GLubyte opacity) |
| Initialize a rich element with different arguments. More...
|
|
var | init ( var tag, var color, var opacity) |
| Initialize a rich element with different arguments. More...
|
|
local | init ( local tag, local color, local opacity) |
| Initialize a rich element with different arguments. More...
|
|
void | retain () |
| Retains the ownership. More...
|
|
void | release () |
| Releases the ownership immediately. More...
|
|
local | 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...
|
|
local | getReferenceCount () |
| Returns the Ref's current reference count. More...
|
|
virtual | ~Ref () |
| Destructor. More...
|
|
|
static RichElementText * | create (int tag, const Color3B &color, GLubyte 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...
|
|
var | create ( var tag, var color, var opacity, var text, var fontName, var fontSize, var 0, var WHITE, var 1, var BLACK, var 0, var 0, var WHITE) |
| Create a RichElementText with various arguments. More...
|
|
local | create ( local tag, local color, local opacity, local text, local fontName, local fontSize, local 0, local WHITE, local 1, local BLACK, local 0, local 0, local WHITE) |
| Create a RichElementText with various arguments. More...
|
|
|
unsigned int | _ID |
| object id, ScriptSupport need public _ID
|
|
local | _ID |
| object id, ScriptSupport need public _ID
|
|
int | _luaID |
| Lua reference id.
|
|
local | _luaID |
| Lua reference id.
|
|
void * | _scriptObject |
| scriptObject, support for swift
|
|
local | _scriptObject |
| scriptObject, support for swift
|
|
bool | _rooted |
| When true, it means that the object was already rooted.
|
|
local | _rooted |
| When true, it means that the object was already rooted.
|
|
Rich element for displaying text.
bool init |
( |
int |
tag, |
|
|
const Color3B & |
color, |
|
|
GLubyte |
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.
- Parameters
-
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 |
- Returns
- True if initialize success, false otherwise.
var init |
( |
var |
tag, |
|
|
var |
color, |
|
|
var |
opacity, |
|
|
var |
text, |
|
|
var |
fontName, |
|
|
var |
fontSize, |
|
|
var |
flags, |
|
|
var |
url, |
|
|
var |
outlineColor = Color3B::WHITE , |
|
|
var |
outlineSize = -1 , |
|
|
var |
shadowColor = Color3B::BLACK , |
|
|
var |
shadowOffset = Size(2.0,-2.0) , |
|
|
var |
shadowBlurRadius = 0 , |
|
|
var |
glowColor = Color3B::WHITE |
|
) |
| |
Initialize a RichElementText with various arguments.
- Parameters
-
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 |
- Returns
- True if initialize success, false otherwise.
local init |
( |
local |
tag, |
|
|
local |
color, |
|
|
local |
opacity, |
|
|
local |
text, |
|
|
local |
fontName, |
|
|
local |
fontSize, |
|
|
local |
flags, |
|
|
local |
url, |
|
|
local |
outlineColor = Color3B::WHITE , |
|
|
local |
outlineSize = -1 , |
|
|
local |
shadowColor = Color3B::BLACK , |
|
|
local |
shadowOffset = Size(2.0,-2.0) , |
|
|
local |
shadowBlurRadius = 0 , |
|
|
local |
glowColor = Color3B::WHITE |
|
) |
| |
Initialize a RichElementText with various arguments.
- Parameters
-
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 |
- Returns
- True if initialize success, false otherwise.
static RichElementText* create |
( |
int |
tag, |
|
|
const Color3B & |
color, |
|
|
GLubyte |
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 |
|
) |
| |
|
static |
Create a RichElementText with various arguments.
- Parameters
-
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 |
- Returns
- RichElementText instance.
var create |
( |
var |
tag, |
|
|
var |
color, |
|
|
var |
opacity, |
|
|
var |
text, |
|
|
var |
fontName, |
|
|
var |
fontSize, |
|
|
var |
flags = 0 , |
|
|
var |
url = "" , |
|
|
var |
outlineColor = Color3B::WHITE , |
|
|
var |
outlineSize = -1 , |
|
|
var |
shadowColor = Color3B::BLACK , |
|
|
var |
shadowOffset = Size(2.0,-2.0) , |
|
|
var |
shadowBlurRadius = 0 , |
|
|
var |
glowColor = Color3B::WHITE |
|
) |
| |
|
static |
Create a RichElementText with various arguments.
- Parameters
-
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 |
- Returns
- RichElementText instance.
local create |
( |
local |
tag, |
|
|
local |
color, |
|
|
local |
opacity, |
|
|
local |
text, |
|
|
local |
fontName, |
|
|
local |
fontSize, |
|
|
local |
flags = 0 , |
|
|
local |
url = "" , |
|
|
local |
outlineColor = Color3B::WHITE , |
|
|
local |
outlineSize = -1 , |
|
|
local |
shadowColor = Color3B::BLACK , |
|
|
local |
shadowOffset = Size(2.0,-2.0) , |
|
|
local |
shadowBlurRadius = 0 , |
|
|
local |
glowColor = Color3B::WHITE |
|
) |
| |
|
static |
Create a RichElementText with various arguments.
- Parameters
-
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 |
- Returns
- RichElementText instance.
The documentation for this class was generated from the following file: