GuiButton Class Reference

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>

Inheritance diagram for GuiButton:

GuiElement

List of all members.

Public Member Functions

 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

GuiImageimage
 Button image (default).
GuiImageimageOver
 Button image for STATE_SELECTED.
GuiImageimageHold
 Button image for STATE_HELD.
GuiImageimageClick
 Button image for STATE_CLICKED.
GuiImageicon
 Button icon (drawn after button image).
GuiImageiconOver
 Button icon for STATE_SELECTED.
GuiImageiconHold
 Button icon for STATE_HELD.
GuiImageiconClick
 Button icon for STATE_CLICKED.
GuiTextlabel [3]
 Label(s) to display (default).
GuiTextlabelOver [3]
 Label(s) to display for STATE_SELECTED.
GuiTextlabelHold [3]
 Label(s) to display for STATE_HELD.
GuiTextlabelClick [3]
 Label(s) to display for STATE_CLICKED.
GuiSoundsoundOver
 Sound to play for STATE_SELECTED.
GuiSoundsoundHold
 Sound to play for STATE_HELD.
GuiSoundsoundClick
 Sound to play for STATE_CLICKED.


Detailed Description

Display, manage, and manipulate buttons in the GUI. Buttons can have images, icons, text, and sound set (all of which are optional).

Constructor & Destructor Documentation

GuiButton::GuiButton ( int  w,
int  h 
)

Constructor

Parameters:
w Width
h Height
Constructor for the GuiButton class.

GuiButton::~GuiButton (  ) 

Destructor.

Destructor for the GuiButton class.


Member Function Documentation

void GuiButton::Draw (  )  [virtual]

Constantly called to draw the GuiButton.

Draw the button on screen

Reimplemented from GuiElement.

void GuiButton::SetIcon ( GuiImage i  ) 

Sets the button's icon

Parameters:
i Pointer to GuiImage object

void GuiButton::SetIconClick ( GuiImage i  ) 

Sets the button's icon on click

Parameters:
i Pointer to GuiImage object

void GuiButton::SetIconHold ( GuiImage i  ) 

Sets the button's icon on hold

Parameters:
i Pointer to GuiImage object

void GuiButton::SetIconOver ( GuiImage i  ) 

Sets the button's icon on over

Parameters:
i Pointer to GuiImage object

void GuiButton::SetImage ( GuiImage i  ) 

Sets the button's image

Parameters:
i Pointer to GuiImage object

void GuiButton::SetImageClick ( GuiImage i  ) 

Sets the button's image on click

Parameters:
i Pointer to GuiImage object

void GuiButton::SetImageHold ( GuiImage i  ) 

Sets the button's image on hold

Parameters:
i Pointer to GuiImage object

void GuiButton::SetImageOver ( GuiImage i  ) 

Sets the button's image on over

Parameters:
i Pointer to GuiImage object

void GuiButton::SetLabel ( GuiText t,
int  n = 0 
)

Sets the button's label

Parameters:
t Pointer to GuiText object
n Index of label to set (optional, default is 0)

void GuiButton::SetLabelClick ( GuiText t,
int  n = 0 
)

Sets the button's label on click

Parameters:
t Pointer to GuiText object
n Index of label to set (optional, default is 0)

void GuiButton::SetLabelHold ( GuiText t,
int  n = 0 
)

Sets the button's label on hold

Parameters:
t Pointer to GuiText object
n Index of label to set (optional, default is 0)

void GuiButton::SetLabelOver ( GuiText t,
int  n = 0 
)

Sets the button's label on over (eg: different colored text)

Parameters:
t Pointer to GuiText object
n Index of label to set (optional, default is 0)

void GuiButton::SetSoundClick ( GuiSound s  ) 

Sets the sound to play on click

Parameters:
s Pointer to GuiSound object

void GuiButton::SetSoundHold ( GuiSound s  ) 

Sets the sound to play on hold

Parameters:
s Pointer to GuiSound object

void GuiButton::SetSoundOver ( GuiSound s  ) 

Sets the sound to play on over

Parameters:
s Pointer to GuiSound object

void GuiButton::Update ( GuiTrigger t  )  [virtual]

Constantly called to allow the GuiButton to respond to updated input data

Parameters:
t Pointer to a GuiTrigger, containing the current input data from PAD/WPAD

Reimplemented from GuiElement.


The documentation for this class was generated from the following files:

Generated on Fri Oct 16 17:57:37 2009 for libwiigui by  doxygen 1.5.8