Murl Engine Lua Addon API  Version 1.0 beta
Murl.IGameControllerMapping

The game controller mapping interface.

The IGameControllerMapping interface can be accessed by the Logic::IDeviceHandler::GetGameControllerMapping() method or the Input::IGameControllerDevice::GetMapping() method.
The RawData is supplied directly from the controller device and can be used to create an interactive mapping setup.
Use GetRawData() to determine the raw data on the game controller, afterwards use SetRawMapping() to setup a corresponding mapping.
Use Logic::IDeviceHandler::GetGameControllerDeviceInfo() or Input::IGameControllerDevice::GetDeviceInfo() to identify the controller.


Table members

Classes


Murl.IGameControllerMapping.AxisMapping
Murl.IGameControllerMapping.AxisRawData
Murl.IGameControllerMapping.ButtonMapping
Murl.IGameControllerMapping.DeviceInfo
Murl.IGameControllerMapping.PovMapping
Murl.IGameControllerMapping.RawData
Murl.IGameControllerMapping.RawMapping

Enumerations


AxisType

Definition of raw data axis types.

Murl.IGameControllerMapping.AXIS_XThe raw data's x-axis.
Murl.IGameControllerMapping.AXIS_YThe raw data's y-axis.
Murl.IGameControllerMapping.AXIS_ZThe raw data's z-axis.
Murl.IGameControllerMapping.AXIS_RXThe raw data's right x-axis.
Murl.IGameControllerMapping.AXIS_RYThe raw data's right y-axis.
Murl.IGameControllerMapping.AXIS_RZThe raw data's right z-axis.

AxisEvent

Definition of axis events.

Murl.IGameControllerMapping.AXIS_EVENT_NONENo axis.
Murl.IGameControllerMapping.AXIS_EVENT_LEFT_STICK_XLeft stick x-axis. The range is [-1.0 left .. 1.0 right]
Murl.IGameControllerMapping.AXIS_EVENT_LEFT_STICK_YLeft stick y-axis. The range is [-1.0 bottom .. 1.0 top]
Murl.IGameControllerMapping.AXIS_EVENT_RIGHT_STICK_XRight stick x-axis. The range is [-1.0 left .. 1.0 right]
Murl.IGameControllerMapping.AXIS_EVENT_RIGHT_STICK_YRight stick y-axis. The range is [-1.0 bottom .. 1.0 top]
Murl.IGameControllerMapping.AXIS_EVENT_L1_BUTTONLeft shoulder button (1st row) value. The range is [0.0 not pressed .. 1.0 full pressed].
Murl.IGameControllerMapping.AXIS_EVENT_R1_BUTTONRight shoulder button (1st row) value. The range is [0.0 not pressed .. 1.0 full pressed].
Murl.IGameControllerMapping.AXIS_EVENT_L2_BUTTONLeft shoulder button (2nd row) value. The range is [0.0 not pressed .. 1.0 full pressed].
Murl.IGameControllerMapping.AXIS_EVENT_R2_BUTTONRight shoulder button (2nd row) value. The range is [0.0 not pressed .. 1.0 full pressed].
Murl.IGameControllerMapping.NUM_AXIS_EVENTS


Typedefs


Murl.IGameControllerMapping.AxisRawDataArray

Definition of an array holding AxisRawData values.

Returns
Murl.SharedArray.IGameControllerMappingAxisRawData

Murl.IGameControllerMapping.AxisMappingArray

Definition of an array holding AxisMapping values.

Returns
Murl.SharedArray.IGameControllerMappingAxisMapping

Murl.IGameControllerMapping.ButtonMappingArray

Definition of an array holding ButtonMapping values.

Returns
Murl.SharedArray.IGameControllerMappingButtonMapping

Murl.IGameControllerMapping.PovMappingArray

Definition of an array holding PovMapping values.

Returns
Murl.SharedArray.IGameControllerMappingPovMapping


Functions



Methods


GetRawData(rawData)

Get the current raw data.

Boolean, Murl.IGameControllerMapping.RawData GetRawData(Murl.IGameControllerMapping.RawData rawData)

Parameters
rawDataThe raw data return value.
Returns
Boolean true if successful.
Murl.IGameControllerMapping.RawData rawData The raw data return value.

SetRawData(rawData)

Set the current raw data. Automatically posts the game controller's events based on the raw data and mapping.
This is typically used by the device implementation only.

Boolean SetRawData(Murl.IGameControllerMapping.RawData rawData)

Parameters
rawDataThe raw data to set.
Returns
Boolean true if successful.

GetRawMapping(rawMapping)

Get the mapping data.

Boolean, Murl.IGameControllerMapping.RawMapping GetRawMapping(Murl.IGameControllerMapping.RawMapping rawMapping)

Parameters
rawMappingThe mapping data return value.
Returns
Boolean true if successful.
Murl.IGameControllerMapping.RawMapping rawMapping The mapping data return value.

SetRawMapping(rawMapping)

Set the mapping data. Automatically sets the game controller's available controls based on the raw mapping.

Boolean SetRawMapping(Murl.IGameControllerMapping.RawMapping rawMapping)

Parameters
rawMappingThe mapping data to set.
Returns
Boolean true if successful.