Represents a GD button sprite where there’s an icon sprite on top another default sprite. You know, it has a base. It’s based. lmao trademark lizbith
Class BasedButtonSprite
#include <Geode/ui/BasedButtonSprite.hpp>
classBasedButtonSprite:publiccocos2d::CCSprite{ ... }
Examples0
Public static methods1
staticgeode::BasedButtonSprite*create(cocos2d::CCNode*ontop,geode::BaseTypetype,intsize,intcolor)
Create a BasedButtonSprite. In general, it is recommended to use the specialized subclasses, such as CircleButtonSprite or TabButtonSprite
ontop
The top node of the sprite
type
The type of the base sprite
size
The size of the base sprite. Cast this from the base type's respective BaseSize enum
color
The color of the base sprite. Cast this from the base type's respective BaseColor enum
Created BasedButtonSprite, or nullptr if parameters were invalid
Public member functions3
voidsetTopOffset(cocos2d::CCPointconst&offset)
Set an offset to the top sprite
cocos2d::CCNode*getTopNode()const
No description provided
Fields0
Protected member functions4
boolinit(cocos2d::CCNode*ontop,geode::BaseTypetype,intsize,intcolor)
No description provided
boolinitWithSprite(charconst*sprName,floatsprScale,geode::BaseTypetype,intsize,intcolor)
No description provided
boolinitWithSpriteFrameName(charconst*sprName,floatsprScale,geode::BaseTypetype,intsize,intcolor)
No description provided
virtualcocos2d::CCSizegetMaxTopSize()const
No description provided
Protected fields6
geode::BaseTypem_type;
No description provided
intm_size;
No description provided
intm_color;
No description provided
cocos2d::CCNode*m_onTop;
No description provided
floatm_onTopRelativeScale;
No description provided
cocos2d::CCPointm_topOffset;
No description provided