Display, manage, and manipulate buttons in the GUI. Buttons can have images, icons, text, and sound set (all of which are optional). More...
#include <gui.h>
Public Member Functions | |
GuiButton () | |
GuiButton (int w, int h) | |
~GuiButton () | |
Destructor. | |
void | SetImage (GuiImage *i) |
void | SetImageOver (GuiImage *i) |
void | SetImageHold (GuiImage *i) |
void | SetImageClick (GuiImage *i) |
void | SetIcon (GuiImage *i) |
void | SetIconOver (GuiImage *i) |
void | SetIconHold (GuiImage *i) |
void | SetIconClick (GuiImage *i) |
void | SetLabel (GuiText *t, int n=0) |
void | SetLabelOver (GuiText *t, int n=0) |
void | SetLabelHold (GuiText *t, int n=0) |
void | SetLabelClick (GuiText *t, int n=0) |
void | SetSoundOver (GuiSound *s) |
void | SetSoundHold (GuiSound *s) |
void | SetSoundClick (GuiSound *s) |
void | Draw () |
Constantly called to draw the GuiButton. | |
void | Update (GuiTrigger *t) |
Protected Attributes | |
GuiImage * | image |
Button image (default). | |
GuiImage * | imageOver |
Button image for STATE_SELECTED. | |
GuiImage * | imageHold |
Button image for STATE_HELD. | |
GuiImage * | imageClick |
Button image for STATE_CLICKED. | |
GuiImage * | icon |
Button icon (drawn after button image). | |
GuiImage * | iconOver |
Button icon for STATE_SELECTED. | |
GuiImage * | iconHold |
Button icon for STATE_HELD. | |
GuiImage * | iconClick |
Button icon for STATE_CLICKED. | |
GuiText * | label [3] |
Label(s) to display (default). | |
GuiText * | labelOver [3] |
Label(s) to display for STATE_SELECTED. | |
GuiText * | labelHold [3] |
Label(s) to display for STATE_HELD. | |
GuiText * | labelClick [3] |
Label(s) to display for STATE_CLICKED. | |
GuiSound * | soundOver |
Sound to play for STATE_SELECTED. | |
GuiSound * | soundHold |
Sound to play for STATE_HELD. | |
GuiSound * | soundClick |
Sound to play for STATE_CLICKED. |
Display, manage, and manipulate buttons in the GUI. Buttons can have images, icons, text, and sound set (all of which are optional).
Definition at line 666 of file gui.h.
GuiButton::GuiButton | ( | ) |
Constructor for the GuiButton class.
Definition at line 16 of file gui_button.cpp.
GuiButton::GuiButton | ( | int | w, | |
int | h | |||
) |
GuiButton::~GuiButton | ( | ) |
void GuiButton::Draw | ( | ) | [virtual] |
Constantly called to draw the GuiButton.
Draw the button on screen
Reimplemented from GuiElement.
Definition at line 155 of file gui_button.cpp.
void GuiButton::SetIcon | ( | GuiImage * | i | ) |
Sets the button's icon
i | Pointer to GuiImage object |
Definition at line 99 of file gui_button.cpp.
void GuiButton::SetIconClick | ( | GuiImage * | i | ) |
Sets the button's icon on click
i | Pointer to GuiImage object |
Definition at line 114 of file gui_button.cpp.
void GuiButton::SetIconHold | ( | GuiImage * | i | ) |
Sets the button's icon on hold
i | Pointer to GuiImage object |
Definition at line 109 of file gui_button.cpp.
void GuiButton::SetIconOver | ( | GuiImage * | i | ) |
Sets the button's icon on over
i | Pointer to GuiImage object |
Definition at line 104 of file gui_button.cpp.
void GuiButton::SetImage | ( | GuiImage * | i | ) |
Sets the button's image
i | Pointer to GuiImage object |
Definition at line 79 of file gui_button.cpp.
void GuiButton::SetImageClick | ( | GuiImage * | i | ) |
Sets the button's image on click
i | Pointer to GuiImage object |
Definition at line 94 of file gui_button.cpp.
void GuiButton::SetImageHold | ( | GuiImage * | i | ) |
Sets the button's image on hold
i | Pointer to GuiImage object |
Definition at line 89 of file gui_button.cpp.
void GuiButton::SetImageOver | ( | GuiImage * | i | ) |
Sets the button's image on over
i | Pointer to GuiImage object |
Definition at line 84 of file gui_button.cpp.
void GuiButton::SetLabel | ( | GuiText * | t, | |
int | n = 0 | |||
) |
Sets the button's label
t | Pointer to GuiText object | |
n | Index of label to set (optional, default is 0) |
Definition at line 119 of file gui_button.cpp.
void GuiButton::SetLabelClick | ( | GuiText * | t, | |
int | n = 0 | |||
) |
Sets the button's label on click
t | Pointer to GuiText object | |
n | Index of label to set (optional, default is 0) |
Definition at line 134 of file gui_button.cpp.
void GuiButton::SetLabelHold | ( | GuiText * | t, | |
int | n = 0 | |||
) |
Sets the button's label on hold
t | Pointer to GuiText object | |
n | Index of label to set (optional, default is 0) |
Definition at line 129 of file gui_button.cpp.
void GuiButton::SetLabelOver | ( | GuiText * | t, | |
int | n = 0 | |||
) |
Sets the button's label on over (eg: different colored text)
t | Pointer to GuiText object | |
n | Index of label to set (optional, default is 0) |
Definition at line 124 of file gui_button.cpp.
void GuiButton::SetSoundClick | ( | GuiSound * | s | ) |
Sets the sound to play on click
s | Pointer to GuiSound object |
Definition at line 147 of file gui_button.cpp.
void GuiButton::SetSoundHold | ( | GuiSound * | s | ) |
Sets the sound to play on hold
s | Pointer to GuiSound object |
Definition at line 143 of file gui_button.cpp.
void GuiButton::SetSoundOver | ( | GuiSound * | s | ) |
Sets the sound to play on over
s | Pointer to GuiSound object |
Definition at line 139 of file gui_button.cpp.
void GuiButton::Update | ( | GuiTrigger * | t | ) | [virtual] |
Constantly called to allow the GuiButton to respond to updated input data
t | Pointer to a GuiTrigger, containing the current input data from PAD/WPAD |
Reimplemented from GuiElement.
Definition at line 182 of file gui_button.cpp.