Create a ButtonSprite with a top sprite and a texture.
Class ButtonSprite
No description provided
Examples0
Public static methods7
staticButtonSprite*create(cocos2d::CCSprite*topSprite,intwidth,boolabsolute,floatheight,charconst*texture,floatscale)
topSprite
The top sprite to add on top of the sprite
width
Sprite width; ignored if `absolute` is false
absolute
Whether to use absolute width or not
texture
The name of the background sprite file (can't be in a spritesheet)
height
The height of the button, leave 0 for automatic
scale
Scale of top spri *
staticButtonSprite*create(charconst*caption,intwidth,boolabsolute,charconst*font,charconst*texture,floatheight,floatscale)
Create a ButtonSprite with text, a font and a texture.
caption
The text of the ButtonSprite
width
Sprite width; ignored if `absolute` is false
absolute
Whether to use absolute width or not
font
The name of the BM font file to use
texture
The name of the background sprite file (can't be in a spritesheet)
height
The height of the button, leave 0 for automatic
scale
Scale of text
Pointer to the created ButtonSprite, or nullptr on err *
staticButtonSprite*create(charconst*caption)
No description provided
staticButtonSprite*create(charconst*caption,charconst*font,charconst*texture)
No description provided
staticButtonSprite*create(charconst*caption,charconst*font,charconst*texture,floatscale)
No description provided
staticButtonSprite*create(,intb,intc,,boole,,,)
No description provided
staticButtonSprite*create(cocos2d::CCSprite*topSprite,intwidth,intunused,floatheight,,boolb,charconst*bgSprite,boolnoScaleSpriteForBG)
No description provided
Public member functions6
boolinit(cocos2d::CCSprite*topSprite,intwidth,intunused,floatscale,floatheight,boolunkBool,charconst*bgSprite,booluseNormalCCSpriteForBG)
No description provided
virtualvoidsetColor()
No description provided
voidsetString()
No description provided
voidupdateBGImage()
No description provided
voidupdateSpriteBGSize()
No description provided
Fields8
uint8_t[24]__pad223;
No description provided
cocos2d::CCLabelBMFont*m_label;
No description provided
cocos2d::CCSprite*m_subSprite;
No description provided
cocos2d::CCSprite*m_subBGSprite;
No description provided
cocos2d::extension::CCScale9Sprite*m_BGSprite;
No description provided
uint8_t[12]__pad228;
No description provided
cocos2d::CCPointm_spritePosition;
No description provided
uint8_t[24]__pad230;
No description provided