Public Member Functions | Public Attributes

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.

Definition at line 168 of file gui.h.


Constructor & Destructor Documentation

GuiTrigger::GuiTrigger (  ) 

Constructor.

Constructor for the GuiTrigger class.

Definition at line 18 of file gui_trigger.cpp.

GuiTrigger::~GuiTrigger (  ) 

Destructor.

Destructor for the GuiTrigger class.

Definition at line 29 of file gui_trigger.cpp.


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

Definition at line 223 of file gui_trigger.cpp.

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

Definition at line 136 of file gui_trigger.cpp.

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

Definition at line 165 of file gui_trigger.cpp.

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

Definition at line 76 of file gui_trigger.cpp.

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

Definition at line 63 of file gui_trigger.cpp.

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

Definition at line 51 of file gui_trigger.cpp.

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

Definition at line 38 of file gui_trigger.cpp.

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

Definition at line 194 of file gui_trigger.cpp.

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

Definition at line 90 of file gui_trigger.cpp.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Enumerations Enumerator Defines