Cocos2d-x
4.0.0
|
Rich element for displaying images. More...
Inherits RichElement.
Public Member Functions | |
RichElementImage () | |
Default constructor. | |
virtual | ~RichElementImage () |
Default destructor. | |
bool | init (int tag, const Color3B &color, uint8_t opacity, const std::string &filePath, const std::string &url="", Widget::TextureResType texType=Widget::TextureResType::LOCAL) |
Initialize a RichElementImage with various arguments. | |
![]() | |
RichElement () | |
Default constructor. | |
virtual | ~RichElement () |
Default destructor. | |
bool | init (int tag, const Color3B &color, uint8_t opacity) |
Initialize a rich element with different arguments. | |
![]() | |
void | retain () |
Retains the ownership. | |
void | release () |
Releases the ownership immediately. | |
Ref * | autorelease () |
Releases the ownership sometime soon automatically. | |
unsigned int | getReferenceCount () const |
Returns the Ref's current reference count. | |
virtual | ~Ref () |
Destructor. | |
Static Public Member Functions | |
static RichElementImage * | create (int tag, const Color3B &color, uint8_t opacity, const std::string &filePath, const std::string &url="", Widget::TextureResType texType=Widget::TextureResType::LOCAL) |
Create a RichElementImage with various arguments. | |
Additional Inherited Members | |
![]() | |
enum | Type { TEXT, IMAGE, CUSTOM, NEWLINE } |
Rich element type. More... | |
![]() | |
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 images.
|
inline |
Default constructor.
ctor new
|
inlinevirtual |
Default destructor.
NA NA
bool init | ( | int | tag, |
const Color3B & | color, | ||
uint8_t | opacity, | ||
const std::string & | filePath, | ||
const std::string & | url = "" , |
||
Widget::TextureResType | texType = Widget::TextureResType::LOCAL |
||
) |
Initialize a RichElementImage with various arguments.
tag | A integer tag value. |
color | A color in Color3B. |
opacity | A opacity in GLubyte. |
filePath | A image file name. |
url | uniform resource locator |
texType | texture type, may be a valid file path, or a sprite frame name |
|
static |
Create a RichElementImage with various arguments.
tag | A integer tag value. |
color | A color in Color3B. |
opacity | A opacity in GLubyte. |
filePath | A image file name. |
url | uniform resource locator |
texType | texture type, may be a valid file path, or a sprite frame name |