ButtonΒΆ
Inherited: AbstractButton
DescriptionΒΆ
The Button class represents a push button element in a graphical user interface (GUI). It is a fundamental UI component that allows users to trigger actions or commands through a simple click or press.
Public MethodsΒΆ
Font * |
font () const |
int |
fontSize () const |
Sprite * |
icon () const |
iconSize () const |
|
void |
setFont (Font * font) |
void |
setFontSize (int size) |
void |
setIcon (Sprite * icon) |
void |
setIconRotation (float angle) |
void |
setIconSize (const Vector2 & size) |
void |
setText (const TString & text) |
void |
setTextColor (const Vector4 & color) |
text () const |
|
textColor () const |
Static MethodsΒΆ
None
Methods DescriptionΒΆ
Font * Button::font () const
Returns the font which will be used to draw a text.
See also setFont().
int Button::fontSize () const
Returns the size of the font.
See also setFontSize().
Sprite * Button::icon () const
Returns the icon shown on the button.
See also setIcon().
Vector2 Button::iconSize () const
Returns the size of the icon.
See also setIconSize().
void Button::setFont (Font * font)
Changes the font which will be used to draw a text.
See also font().
void Button::setFontSize (int size)
Changes the size of the font.
See also fontSize().
void Button::setIcon (Sprite * icon)
Sets the icon shown on the button.
See also icon().
void Button::setIconRotation (float angle)
Sets icon rotation angle.
void Button::setIconSize (Vector2 & size)
Sets the size of the icon.
See also iconSize().
void Button::setText (TString & text)
Sets the text displayed on the button.
See also text().
void Button::setTextColor (Vector4 & color)
Sets the normal color of the button.
See also textColor().
TString Button::text () const
Returns the text displayed on the button.
See also setText().
Vector4 Button::textColor () const
Returns the normal color of the button.
See also setTextColor().