libgui 2.01
libgui is a GUI library for the GameCube, Wii, and Wii U
 
Loading...
Searching...
No Matches
InputPadData Struct Reference

The universal input payload for UI elements. More...

#include <InputData.h>

Public Attributes

Unified state

The merged view across every connected profile; for each value the profile with the largest magnitude wins.

uint32_t buttons_d
 Pressed this frame (down)
 
uint32_t buttons_h
 Held this frame.
 
uint32_t buttons_r
 Released this frame.
 
float stickX
 Left analog stick X, -1.0 to 1.0.
 
float stickY
 Left analog stick Y, -1.0 to 1.0.
 
float substickX
 Right analog stick (C-Stick) X, -1.0 to 1.0.
 
float substickY
 Right analog stick (C-Stick) Y, -1.0 to 1.0.
 
float gforceX
 Accelerometer X (Wiimote/Nunchuk/GamePad)
 
float gforceY
 Accelerometer Y.
 
float gforceZ
 Accelerometer Z.
 
float pitch
 Controller orientation pitch (Wiimote/Nunchuk)
 
float roll
 Controller orientation roll.
 
float yaw
 Controller orientation yaw.
 
uint32_t battery_level
 Controller battery level as reported by the backend.
 
float cursor_x
 Pointer X on the design canvas (Wiimote IR / GamePad touch)
 
float cursor_y
 Pointer Y on the design canvas.
 
float cursor_angle
 Pointer rotation (Wiimote roll)
 
bool validPointer
 True if the IR pointer or touch is active on screen.
 
bool isTouch
 True if input is direct touch (VPad) vs IR pointer.
 
Per-hardware-profile state

The same fields as above, indexed by GuiHardwareProfile, so a driver can report e.g.

Wiimote buttons and a Nunchuk stick as separate contributors before they are merged.

bool hw_connected [INPUT_HW_MAX]
 Profile is connected and contributing.
 
uint32_t hw_buttons_d [INPUT_HW_MAX]
 Buttons pressed this frame, per profile.
 
uint32_t hw_buttons_h [INPUT_HW_MAX]
 Buttons held this frame, per profile.
 
uint32_t hw_buttons_r [INPUT_HW_MAX]
 Buttons released this frame, per profile.
 
float hw_stickX [INPUT_HW_MAX]
 Left stick X, per profile.
 
float hw_stickY [INPUT_HW_MAX]
 Left stick Y, per profile.
 
float hw_substickX [INPUT_HW_MAX]
 Right stick X, per profile.
 
float hw_substickY [INPUT_HW_MAX]
 Right stick Y, per profile.
 
float hw_triggerL [INPUT_HW_MAX]
 Analog L trigger / shoulder, 0.0 - 1.0, per profile (GameCube, Classic, WUPC); 0 where the hardware has no analog trigger.
 
float hw_triggerR [INPUT_HW_MAX]
 Analog R trigger / shoulder, 0.0 - 1.0, per profile.
 
float hw_gforceX [INPUT_HW_MAX]
 Accelerometer X, per profile.
 
float hw_gforceY [INPUT_HW_MAX]
 Accelerometer Y, per profile.
 
float hw_gforceZ [INPUT_HW_MAX]
 Accelerometer Z, per profile.
 
float hw_pitch [INPUT_HW_MAX]
 Orientation pitch, per profile.
 
float hw_roll [INPUT_HW_MAX]
 Orientation roll, per profile.
 
float hw_yaw [INPUT_HW_MAX]
 Orientation yaw, per profile.
 

Detailed Description

The universal input payload for UI elements.

Generated by the driver layer and consumed by GuiElement::update().

Definition at line 57 of file InputData.h.

Constructor & Destructor Documentation

◆ InputPadData()

InputPadData::InputPadData ( )
inline

Definition at line 104 of file InputData.h.

Member Data Documentation

◆ battery_level

uint32_t InputPadData::battery_level

Controller battery level as reported by the backend.

Definition at line 74 of file InputData.h.

◆ buttons_d

uint32_t InputPadData::buttons_d

Pressed this frame (down)

Definition at line 61 of file InputData.h.

◆ buttons_h

uint32_t InputPadData::buttons_h

Held this frame.

Definition at line 62 of file InputData.h.

◆ buttons_r

uint32_t InputPadData::buttons_r

Released this frame.

Definition at line 63 of file InputData.h.

◆ cursor_angle

float InputPadData::cursor_angle

Pointer rotation (Wiimote roll)

Definition at line 77 of file InputData.h.

◆ cursor_x

float InputPadData::cursor_x

Pointer X on the design canvas (Wiimote IR / GamePad touch)

Definition at line 75 of file InputData.h.

◆ cursor_y

float InputPadData::cursor_y

Pointer Y on the design canvas.

Definition at line 76 of file InputData.h.

◆ gforceX

float InputPadData::gforceX

Accelerometer X (Wiimote/Nunchuk/GamePad)

Definition at line 68 of file InputData.h.

◆ gforceY

float InputPadData::gforceY

Accelerometer Y.

Definition at line 69 of file InputData.h.

◆ gforceZ

float InputPadData::gforceZ

Accelerometer Z.

Definition at line 70 of file InputData.h.

◆ hw_buttons_d

uint32_t InputPadData::hw_buttons_d[INPUT_HW_MAX]

Buttons pressed this frame, per profile.

Definition at line 86 of file InputData.h.

◆ hw_buttons_h

uint32_t InputPadData::hw_buttons_h[INPUT_HW_MAX]

Buttons held this frame, per profile.

Definition at line 87 of file InputData.h.

◆ hw_buttons_r

uint32_t InputPadData::hw_buttons_r[INPUT_HW_MAX]

Buttons released this frame, per profile.

Definition at line 88 of file InputData.h.

◆ hw_connected

bool InputPadData::hw_connected[INPUT_HW_MAX]

Profile is connected and contributing.

Definition at line 85 of file InputData.h.

◆ hw_gforceX

float InputPadData::hw_gforceX[INPUT_HW_MAX]

Accelerometer X, per profile.

Definition at line 96 of file InputData.h.

◆ hw_gforceY

float InputPadData::hw_gforceY[INPUT_HW_MAX]

Accelerometer Y, per profile.

Definition at line 97 of file InputData.h.

◆ hw_gforceZ

float InputPadData::hw_gforceZ[INPUT_HW_MAX]

Accelerometer Z, per profile.

Definition at line 98 of file InputData.h.

◆ hw_pitch

float InputPadData::hw_pitch[INPUT_HW_MAX]

Orientation pitch, per profile.

Definition at line 99 of file InputData.h.

◆ hw_roll

float InputPadData::hw_roll[INPUT_HW_MAX]

Orientation roll, per profile.

Definition at line 100 of file InputData.h.

◆ hw_stickX

float InputPadData::hw_stickX[INPUT_HW_MAX]

Left stick X, per profile.

Definition at line 89 of file InputData.h.

◆ hw_stickY

float InputPadData::hw_stickY[INPUT_HW_MAX]

Left stick Y, per profile.

Definition at line 90 of file InputData.h.

◆ hw_substickX

float InputPadData::hw_substickX[INPUT_HW_MAX]

Right stick X, per profile.

Definition at line 91 of file InputData.h.

◆ hw_substickY

float InputPadData::hw_substickY[INPUT_HW_MAX]

Right stick Y, per profile.

Definition at line 92 of file InputData.h.

◆ hw_triggerL

float InputPadData::hw_triggerL[INPUT_HW_MAX]

Analog L trigger / shoulder, 0.0 - 1.0, per profile (GameCube, Classic, WUPC); 0 where the hardware has no analog trigger.

Definition at line 93 of file InputData.h.

◆ hw_triggerR

float InputPadData::hw_triggerR[INPUT_HW_MAX]

Analog R trigger / shoulder, 0.0 - 1.0, per profile.

Definition at line 94 of file InputData.h.

◆ hw_yaw

float InputPadData::hw_yaw[INPUT_HW_MAX]

Orientation yaw, per profile.

Definition at line 101 of file InputData.h.

◆ isTouch

bool InputPadData::isTouch

True if input is direct touch (VPad) vs IR pointer.

Definition at line 79 of file InputData.h.

◆ pitch

float InputPadData::pitch

Controller orientation pitch (Wiimote/Nunchuk)

Definition at line 71 of file InputData.h.

◆ roll

float InputPadData::roll

Controller orientation roll.

Definition at line 72 of file InputData.h.

◆ stickX

float InputPadData::stickX

Left analog stick X, -1.0 to 1.0.

Definition at line 64 of file InputData.h.

◆ stickY

float InputPadData::stickY

Left analog stick Y, -1.0 to 1.0.

Definition at line 65 of file InputData.h.

◆ substickX

float InputPadData::substickX

Right analog stick (C-Stick) X, -1.0 to 1.0.

Definition at line 66 of file InputData.h.

◆ substickY

float InputPadData::substickY

Right analog stick (C-Stick) Y, -1.0 to 1.0.

Definition at line 67 of file InputData.h.

◆ validPointer

bool InputPadData::validPointer

True if the IR pointer or touch is active on screen.

Definition at line 78 of file InputData.h.

◆ yaw

float InputPadData::yaw

Controller orientation yaw.

Definition at line 73 of file InputData.h.


The documentation for this struct was generated from the following file: