-
Notifications
You must be signed in to change notification settings - Fork 0
ButtonO Class Accessors and Mutators
Alex Ricciardi edited this page Feb 5, 2023
·
4 revisions
//----------------------------------------------------------------------------
Mutators Inherited from ButtonR
//----------------------------------------------------------------------------
/*----------------------------------------------------------
Builds the button,
computes size from the font size and length of the text
-----------------------------------------------------------*/
void buildBtn();
/*----------------------------------------------------
Updates button
-----------------------------------------------------*/
int update();
/*----------------------------------------------------
Sets font size and
Resizes the button to fit the text
Takes a string
-----------------------------------------------------*/
void setFontSize(float fontSize);
/*----------------------------------------------------
Sets font size and
does NOT resizes the button to fit the text
Takes a string
-----------------------------------------------------*/
void setFontSizeNoResize(float fontSize);
/*----------------------------------------------------
Sets text and
Resizes the button to fit the text
Takes a string
-----------------------------------------------------*/
void setText(string text);
/*----------------------------------------------------
Sets text and
does NOT resizes the button to fit the text
Takes a string
-----------------------------------------------------*/
void setTextNoResize(string text);
/*----------------------------------------------------
Sets text position
does NOT resizes the button to fit the text
-----------------------------------------------------*/
void setTextPosition(float x, float y);
/*----------------------------------------------------
Sets the button position on the screen
-----------------------------------------------------*/
void setBtnPosition(float btnX, float btnY);
/*----------------------------------------------------
Sets sizes of the button,
does not resize fonts
-----------------------------------------------------*/
void setBtnSize(float btnWidth, float btnHeight);
//----------------------------------------------------------------------------------
//----------------------------------------------------------------------------------
// Accessors Methods
//----------------------------------------------------------------------------------
/*----------------------------------------------------
draw button
Not inherited by child classes
-----------------------------------------------------*/
void draw();