MLInputControllerStateEx
Module: Input
A structure containing information about the current state of an input controller. More...
#include <ml_input.h>
Public Attributes
Type | Name |
---|---|
uint32_t | version |
MLInputControllerType | type |
MLInputControllerHand | hand |
MLVec3f[MLInput_MaxControllerTouchpadTouches] | touch_pos_and_force Current touch position (x,y) and force (z). Position is in the [-1.0,1.0] range and force is in the [0.0,1.0] range. |
float | trigger_normalized |
bool[MLInputControllerButton_Count] | button_state |
bool[MLInput_MaxControllerTouchpadTouches] | is_touch_active |
bool | is_connected |
MLInputControllerTouchpadGesture | touchpad_gesture |
MLInputControllerTouchpadGestureState | touchpad_gesture_state |
uint8_t | hardware_index Hardware index of this controller. For ML2 physical controller this value will always be 0. |
Detailed Description
struct MLInputControllerStateEx;
A structure containing information about the current state of an input controller.
API Level:
- 21
Public Attributes Documentation
version
uint32_t version;
Version of this structure.
type
MLInputControllerType type;
Type of this controller.
hand
MLInputControllerHand hand;
Type | Description |
---|---|
MLInputControllerHand | Hand in which the controller is held. |
Controller holding hand.
touch_pos_and_force
MLVec3f[MLInput_MaxControllerTouchpadTouches] touch_pos_and_force;
Current touch position (x,y) and force (z). Position is in the [-1.0,1.0] range and force is in the [0.0,1.0] range.
Type | Description |
---|---|
MLVec3f[MLInput_MaxControllerTouchpadTouches] | [MLInput_MaxControllerTouchpadTouches] |
trigger_normalized
float trigger_normalized;
Normalized trigger value [0.0,1.0].
button_state
bool[MLInputControllerButton_Count] button_state;
Type | Description |
---|---|
bool[MLInputControllerButton_Count] | [MLInputControllerButton_Count] |
Button states.
is_touch_active
bool[MLInput_MaxControllerTouchpadTouches] is_touch_active;
Type | Description |
---|---|
bool[MLInput_MaxControllerTouchpadTouches] | [MLInput_MaxControllerTouchpadTouches] |
If this controller's touch is active.
is_connected
bool is_connected;
If this controller is connected.
touchpad_gesture
MLInputControllerTouchpadGesture touchpad_gesture;
Current touchpad gesture.
touchpad_gesture_state
MLInputControllerTouchpadGestureState touchpad_gesture_state;
Current touchpad gesture state.
hardware_index
uint8_t hardware_index;
Hardware index of this controller. For ML2 physical controller this value will always be 0.