Create button GameObjects that receive a click event.
More...
|
static GameObject | CreateStaticButton (string objectName, void delegate() callback, SDL_Renderer *renderer, int xPosition, int yPosition, int width, int height, string jsonPath, SDL_Rect *camera) |
| Create a texture-based button.
|
|
static GameObject | CreateTextButton (string objectName, string buttonLabel, void delegate() callback, SDL_Renderer *renderer, int xPosition, int yPosition, SDL_Rect *camera) |
| Create a text-based button.
|
|
Create button GameObjects that receive a click event.
- See also
- GameObject
◆ CreateStaticButton()
static GameObject ButtonFactory::CreateStaticButton |
( |
string | objectName, |
|
|
void delegate() | callback, |
|
|
SDL_Renderer * | renderer, |
|
|
int | xPosition, |
|
|
int | yPosition, |
|
|
int | width, |
|
|
int | height, |
|
|
string | jsonPath, |
|
|
SDL_Rect * | camera ) |
|
inlinestatic |
Create a texture-based button.
- Parameters
-
objectName | the type of GameObject to create. |
callback | the function to call when the button is clicked. |
renderer | the SDL renderer object. |
xPosition | the initial x coordinate of the GameObject in pixels. |
yPosition | the initial y coordinate of the GameObject in pixels. |
width | the button width in pixels. |
height | the button height in pixels. |
jsonPath | the path to the animation's JSON configuration file. |
camera | the viewport camera SDL rectangle object. |
- Returns
- the configured GameObject.
- See also
- GameObject
◆ CreateTextButton()
static GameObject ButtonFactory::CreateTextButton |
( |
string | objectName, |
|
|
string | buttonLabel, |
|
|
void delegate() | callback, |
|
|
SDL_Renderer * | renderer, |
|
|
int | xPosition, |
|
|
int | yPosition, |
|
|
SDL_Rect * | camera ) |
|
inlinestatic |
Create a text-based button.
- Parameters
-
objectName | the type of GameObject to create. |
buttonLabel | the text to display on the button |
callback | the function to call when the button is clicked. |
renderer | the SDL renderer object. |
xPosition | the initial x coordinate of the GameObject in pixels. |
yPosition | the initial y coordinate of the GameObject in pixels. |
camera | the viewport camera SDL rectangle object. |
- Returns
- the configured GameObject.
- See also
- GameObject
The documentation for this class was generated from the following file: