GuiTrigger Class Reference

Menu input trigger management. Determine if action is neccessary based on input data by comparing controller input data to a specific trigger element. More...

#include <gui.h>

List of all members.

Public Member Functions

 GuiTrigger ()
 Constructor.
 ~GuiTrigger ()
 Destructor.
void SetSimpleTrigger (s32 ch, u32 wiibtns, u16 gcbtns)
void SetHeldTrigger (s32 ch, u32 wiibtns, u16 gcbtns)
void SetButtonOnlyTrigger (s32 ch, u32 wiibtns, u16 gcbtns)
void SetButtonOnlyInFocusTrigger (s32 ch, u32 wiibtns, u16 gcbtns)
s8 WPAD_Stick (u8 right, int axis)
bool Left ()
bool Right ()
bool Up ()
bool Down ()

Public Attributes

u8 type
 trigger type (TRIGGER_SIMPLE, TRIGGER_HELD, TRIGGER_BUTTON_ONLY, TRIGGER_BUTTON_ONLY_IN_FOCUS)
s32 chan
 Trigger controller channel (0-3, -1 for all).
WPADData * wpad
 Wii controller trigger.
WPADData wpaddata
 Wii controller trigger data.
PADData pad
 GameCube controller trigger data.


Detailed Description

Menu input trigger management. Determine if action is neccessary based on input data by comparing controller input data to a specific trigger element.

Constructor & Destructor Documentation

GuiTrigger::GuiTrigger (  ) 

Constructor.

Constructor for the GuiTrigger class.

GuiTrigger::~GuiTrigger (  ) 

Destructor.

Destructor for the GuiTrigger class.


Member Function Documentation

bool GuiTrigger::Down (  ) 

Move menu selection down (via pad/joystick). Allows scroll delay and button overriding

Returns:
true if selection should be moved down, false otherwise

bool GuiTrigger::Left (  ) 

Move menu selection left (via pad/joystick). Allows scroll delay and button overriding

Returns:
true if selection should be moved left, false otherwise

bool GuiTrigger::Right (  ) 

Move menu selection right (via pad/joystick). Allows scroll delay and button overriding

Returns:
true if selection should be moved right, false otherwise

void GuiTrigger::SetButtonOnlyInFocusTrigger ( s32  ch,
u32  wiibtns,
u16  gcbtns 
)

Sets a button-only trigger. Requires: trigger button is pressed and parent window of element is in focus

Parameters:
ch Controller channel number
wiibtns Wii controller trigger button(s) - classic controller buttons are considered separately
gcbtns GameCube controller trigger button(s)
Sets a button trigger. Requires:
  • Trigger button is pressed
  • Parent window is in focus

void GuiTrigger::SetButtonOnlyTrigger ( s32  ch,
u32  wiibtns,
u16  gcbtns 
)

Sets a button-only trigger. Requires: Trigger button is pressed

Parameters:
ch Controller channel number
wiibtns Wii controller trigger button(s) - classic controller buttons are considered separately
gcbtns GameCube controller trigger button(s)
Sets a button trigger. Requires:
  • Trigger button is pressed

void GuiTrigger::SetHeldTrigger ( s32  ch,
u32  wiibtns,
u16  gcbtns 
)

Sets a held trigger. Requires: element is selected, and trigger button is pressed

Parameters:
ch Controller channel number
wiibtns Wii controller trigger button(s) - classic controller buttons are considered separately
gcbtns GameCube controller trigger button(s)
Sets a held trigger. Requires:
  • Element is selected
  • Trigger button is pressed and held

void GuiTrigger::SetSimpleTrigger ( s32  ch,
u32  wiibtns,
u16  gcbtns 
)

Sets a simple trigger. Requires: element is selected, and trigger button is pressed

Parameters:
ch Controller channel number
wiibtns Wii controller trigger button(s) - classic controller buttons are considered separately
gcbtns GameCube controller trigger button(s)
Sets a simple trigger. Requires:
  • Element is selected
  • Trigger button is pressed

bool GuiTrigger::Up (  ) 

Move menu selection up (via pad/joystick). Allows scroll delay and button overriding

Returns:
true if selection should be moved up, false otherwise

s8 GuiTrigger::WPAD_Stick ( u8  right,
int  axis 
)

Get X/Y value from Wii Joystick (classic, nunchuk) input

Parameters:
right Controller stick (left = 0, right = 1)
axis Controller stick axis (x-axis = 0, y-axis = 1)
Returns:
Stick value


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