Class BasedButtonSprite

#include <Geode/ui/BasedButtonSprite.hpp>
classBasedButtonSprite:publiccocos2d::CCSprite{ ... }

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

Examples0
Public static methods1
staticgeode::BasedButtonSprite*create(,,
intsize
,
intcolor
)

Create a BasedButtonSprite. In general, it is recommended to use the specialized subclasses, such as CircleButtonSprite or TabButtonSprite

Parameters

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
Return value
Created BasedButtonSprite, or nullptr if parameters were invalid
Public member functions3
voidsetTopOffset()

Set an offset to the top sprite

voidsetTopRelativeScale(
floatscale
)
No description provided
cocos2d::CCNode*getTopNode()const
No description provided
Fields0
Protected member functions4
boolinit(,,
intsize
,
intcolor
)
No description provided
boolinitWithSprite(
charconst*sprName
,
floatsprScale
,,
intsize
,
intcolor
)
No description provided
boolinitWithSpriteFrameName(
charconst*sprName
,
floatsprScale
,,
intsize
,
intcolor
)
No description provided
virtualcocos2d::CCSizegetMaxTopSize()const
No description provided
Protected fields6
;
No description provided
intm_size
;
No description provided
intm_color
;
No description provided
;
No description provided
floatm_onTopRelativeScale
;
No description provided
cocos2d::CCPointm_topOffset
;
No description provided