Create a ButtonSprite with a top sprite and a texture.
Class ButtonSprite
#include <Geode/binding/ButtonSprite.hpp>
classButtonSprite:publiccocos2d::CCSprite{ ... }
No description provided
Examples0
Public static methods12
staticButtonSprite*create(charconst*caption,intwidth,intp2,floatscale,boolabsolute,charconst*font,,floatheight)
No description provided
staticButtonSprite*create(cocos2d::CCSprite*topSprite,intwidth,intunused,floatheight,floatscale,boolabsolute,charconst*bgSprite,boolnoScaleSpriteForBG)
No description provided
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(charconst*caption,floatscale)
No description provided
staticButtonSprite*create(charconst*caption,intwidth,intp2,floatscale,boolabsolute,charconst*font,)
No description provided
staticButtonSprite*create(charconst*caption,intwidth,intp2,floatscale,boolabsolute)
No description provided
staticButtonSprite*create(cocos2d::CCSprite*topSprite,intwidth,intunused,floatheight,floatscale,boolabsolute)
No description provided
staticButtonSprite*create(cocos2d::CCSprite*topSprite)
No description provided
Public member functions7
boolinit(cocos2d::CCSprite*topSprite,intwidth,intunused,floatheight,floatscale,boolabsolute,charconst*bgSprite,boolnoScaleSpriteForBG)
No description provided
voidsetColor(cocos2d::ccColor3Bcolor)
No description provided
voidsetString()
No description provided
voidupdateBGImage()
No description provided
voidupdateSpriteBGSize()
No description provided
voidupdateSpriteOffset(cocos2d::CCPointoffset)
No description provided
Fields13
intm_mode;
No description provided
floatm_width;
No description provided
floatm_unkFloat;
No description provided
floatm_scale;
No description provided
floatm_height;
No description provided
boolm_absolute;
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
cocos2d::CCPointm_textOffset;
No description provided
cocos2d::CCPointm_spritePosition;
No description provided
gd::stringm_caption;
No description provided