#include <gui.h>
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. |
GuiTrigger::GuiTrigger | ( | ) |
Constructor.
Constructor for the GuiTrigger class.
GuiTrigger::~GuiTrigger | ( | ) |
Destructor.
Destructor for the GuiTrigger class.
bool GuiTrigger::Down | ( | ) |
Move menu selection down (via pad/joystick). Allows scroll delay and button overriding
bool GuiTrigger::Left | ( | ) |
Move menu selection left (via pad/joystick). Allows scroll delay and button overriding
bool GuiTrigger::Right | ( | ) |
Move menu selection right (via pad/joystick). Allows scroll delay and button overriding
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
ch | Controller channel number | |
wiibtns | Wii controller trigger button(s) - classic controller buttons are considered separately | |
gcbtns | GameCube controller trigger button(s) |
void GuiTrigger::SetButtonOnlyTrigger | ( | s32 | ch, | |
u32 | wiibtns, | |||
u16 | gcbtns | |||
) |
Sets a button-only trigger. Requires: Trigger button is pressed
ch | Controller channel number | |
wiibtns | Wii controller trigger button(s) - classic controller buttons are considered separately | |
gcbtns | GameCube controller trigger button(s) |
void GuiTrigger::SetHeldTrigger | ( | s32 | ch, | |
u32 | wiibtns, | |||
u16 | gcbtns | |||
) |
Sets a held trigger. Requires: element is selected, and trigger button is pressed
ch | Controller channel number | |
wiibtns | Wii controller trigger button(s) - classic controller buttons are considered separately | |
gcbtns | GameCube controller trigger button(s) |
void GuiTrigger::SetSimpleTrigger | ( | s32 | ch, | |
u32 | wiibtns, | |||
u16 | gcbtns | |||
) |
Sets a simple trigger. Requires: element is selected, and trigger button is pressed
ch | Controller channel number | |
wiibtns | Wii controller trigger button(s) - classic controller buttons are considered separately | |
gcbtns | GameCube controller trigger button(s) |
bool GuiTrigger::Up | ( | ) |
Move menu selection up (via pad/joystick). Allows scroll delay and button overriding
s8 GuiTrigger::WPAD_Stick | ( | u8 | right, | |
int | axis | |||
) |
Get X/Y value from Wii Joystick (classic, nunchuk) input
right | Controller stick (left = 0, right = 1) | |
axis | Controller stick axis (x-axis = 0, y-axis = 1) |