#include <Button.h>
Inheritance diagram for Button:
Public Member Functions | |
Button (const string &label, const string &name, Font *font) | |
~Button () | |
void | draw (float x, float y, float zoom) |
Type | getType () |
float | getWidth (float zoom) |
float | getHeight (float zoom) |
string & | getName () |
bool | handleKeyEvent (SDL_Event *event) |
bool | wasClicked () |
Definition at line 13 of file Button.h.
|
Constructor that takes label as the text to display to the user name the save name of button (soon to be removed) font the font to render the button with Definition at line 6 of file Button.cpp. |
|
Destuctor Definition at line 14 of file Button.cpp. |
|
Draws the MenuItem at x,y with a zoom factor of zoom (2 equals double size). The MenuItem may decide not to apply the scale or to only support some zoom steps, always check getWidth and getHeight if you need the excact size. Implements MenuItem. Definition at line 18 of file Button.cpp. |
|
Returns the height of this MenuItem at zoom factor zoom, must be excact Implements MenuItem. Definition at line 28 of file Button.cpp. |
|
Returns the name of the MenuItem used when save is called. The name may not contain a =. Implements MenuItem. |
|
Returns the Type of this control. Implements MenuItem. Reimplemented in BackButton. |
|
Returns the width of this MenuItem at zoom factor zoom, must be excact Implements MenuItem. Definition at line 23 of file Button.cpp. |
|
Called when a key press/release event occurs, return true if the MenuItem has handled the event. If true is returned the event handling will stop. Implements MenuItem. Definition at line 33 of file Button.cpp. |
|
Returns true if the button has been clicked since last time it was checked. Definition at line 42 of file Button.cpp. |