Skip to main content
Version: 14 Oct 2024

MLInputControllerState

Module: Input

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

#include <ml_input.h>

Public Attributes

TypeName
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
MLInputControllerTypetype
uint8_thardware_index
Hardware index of this controller. For ML2 physical controller this value will always be 0.

Detailed Description

struct MLInputControllerState;

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

Deprecated

Deprecated since 1.1.0. Scheduled for removal.


Public Attributes Documentation

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.


type

MLInputControllerType type;

Type of this controller.


hardware_index

uint8_t hardware_index;

Hardware index of this controller. For ML2 physical controller this value will always be 0.