Skip to main content
Version: 20 Mar 2024

MLInputControllerStateEx

Module: Input

A structure containing information about the current state of an input controller. More...

#include <ml_input.h>

Public Attributes

TypeName
uint32_tversion
MLInputControllerTypetype
MLInputControllerHandhand
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.
floattrigger_normalized
bool[MLInputControllerButton_Count]button_state
bool[MLInput_MaxControllerTouchpadTouches]is_touch_active
boolis_connected
MLInputControllerTouchpadGesturetouchpad_gesture
MLInputControllerTouchpadGestureStatetouchpad_gesture_state
uint8_thardware_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;
TypeDescription
MLInputControllerHandHand 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.

TypeDescription
MLVec3f[MLInput_MaxControllerTouchpadTouches][MLInput_MaxControllerTouchpadTouches]

trigger_normalized

float trigger_normalized;

Normalized trigger value [0.0,1.0].


button_state

bool[MLInputControllerButton_Count] button_state;
TypeDescription
bool[MLInputControllerButton_Count][MLInputControllerButton_Count]

Button states.


is_touch_active

bool[MLInput_MaxControllerTouchpadTouches] is_touch_active;
TypeDescription
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.