A State for a button.
More...
#include <Button.h>
◆ Button() [1/2]
Button::Button |
( |
std::string |
buttonImage, |
|
|
std::string |
buttonHeldSprite, |
|
|
Vec2 |
inPos, |
|
|
Vec2 |
inDim |
|
) |
| |
Constructs the Button object.
- Parameters
-
buttonImage | A path to the image of the button. |
buttonHeldSprite | A path to the held image of the button. |
pos | The position. |
dim | The dimensions. |
◆ Button() [2/2]
Button::Button |
( |
std::string |
buttonImage, |
|
|
std::string |
buttonHeldSprite, |
|
|
Vec2 |
inPos |
|
) |
| |
Constructs the Button object.
- Parameters
-
buttonImage | A path to the image of the button. |
buttonHeldSprite | A path to the held image of the button. |
pos | The position. |
◆ ~Button()
◆ draw()
◆ input()
Handles the Button input.
- Returns
- If the button is released.
◆ buttonHeldSprite
std::string Button::buttonHeldSprite |
|
private |
◆ buttonSprite
std::string Button::buttonSprite |
|
private |
◆ dim
◆ pos
The button position and dimensions.
◆ pressed
A boolean for if the button is pressed.
The documentation for this class was generated from the following files: