ActionMap

Engine/source/sim/actionMap.h

Map raw inputs to a variety of actions.

More...

Classes:

class

Used to represent a devices.

Console Interface Functions

const char *
getBinding(const char * command)

Find what the given command is bound to.

const char *
getCommand(const char * device, const char * action)

Find what command is bound to the given event descriptor .

bool
isInverted(const char * device, const char * action)
getScale(const char * device, const char * action)
const char *
getDeadZone(const char * device, const char * action)

Private Types

Parent 

Public Friends

Protected Attributes

Protected Static Attributes

Protected Functions

bool
findBoundNode(const char * function, U32 & devMapIndex, U32 & nodeIndex)
findNode(const U32 inDeviceType, const U32 inDeviceInst, const U32 inModifiers, const U32 inAction)
Node *
getNode(const U32 inDeviceType, const U32 inDeviceInst, const U32 inModifiers, const U32 inAction, SimObject * object)
bool
nextBoundNode(const char * function, U32 & devMapIndex, U32 & nodeIndex)
bool

Called when the object is added to the sim.

removeNode(const U32 inDeviceType, const U32 inDeviceInst, const U32 inModifiers, const U32 inAction, SimObject * object)

Protected Static Functions

fireBreakEvent(U32 idx, F32 value)

Pass index to a break entry, and this function will fire it off.

const char *

Public Functions

dumpActionMap(const char * fileName, const bool append)
bool
isAction(U32 deviceType, U32 deviceInst, U32 modifiers, U32 action)

Return true if the given event triggers is bound to an action in this map.

bool
processBind(const U32 argc, const char ** argv, SimObject * object)
bool
processBindCmd(const char * device, const char * action, const char * makeCmd, const char * breakCmd)
bool
processHoldBind(const char * device, const char * action, const char * holdFunc, const char * tapFunc, const U32 holdTime, const bool holdOnly, const bool returnHoldTime)
bool
processUnbind(const char * device, const char * action, SimObject * object)

Public Static Functions

bool
checkAsciiGlobal(U16 key, U32 modifiers)

Returns true if the specified key + modifiers are bound to something on the global action map.

Called when we lose focus, to make sure we have no dangling inputs.

bool
createEventDescriptor(const char * pEventString, EventDescriptor * pDescriptor)
bool
getDeviceName(const U32 deviceType, const U32 deviceInstance, char * buffer)
bool
getDeviceTypeAndInstance(const char * device, U32 & deviceType, U32 & deviceInstance)

Returns the global ActionMap.

bool
getKeyString(const U32 action, char * buffer)

Detailed Description

Map raw inputs to a variety of actions.

This is used for all keymapping in the engine.

Console Interface Functions

getBinding(const char * command)

Find what the given command is bound to.

getCommand(const char * device, const char * action)

Find what command is bound to the given event descriptor .

isInverted(const char * device, const char * action)

getScale(const char * device, const char * action)

getDeadZone(const char * device, const char * action)

Private Types

typedef SimObject Parent 

Public Friends

Protected Attributes

Vector< DeviceMap * > mDeviceMaps 

Protected Static Attributes

Vector< BreakEntry > smBreakTable 

Protected Functions

enterBreakEvent(const InputEventInfo * pEvent, const Node * pNode)

findBoundNode(const char * function, U32 & devMapIndex, U32 & nodeIndex)

findNode(const U32 inDeviceType, const U32 inDeviceInst, const U32 inModifiers, const U32 inAction)

getNode(const U32 inDeviceType, const U32 inDeviceInst, const U32 inModifiers, const U32 inAction, SimObject * object)

nextBoundNode(const char * function, U32 & devMapIndex, U32 & nodeIndex)

onAdd()

Reimplemented from: SimObject

removeNode(const U32 inDeviceType, const U32 inDeviceInst, const U32 inModifiers, const U32 inAction, SimObject * object)

Protected Static Functions

fireBreakEvent(U32 idx, F32 value)

Pass index to a break entry, and this function will fire it off.

getModifierString(const U32 modifiers)

Public Functions

ActionMap()

~ActionMap()

DECLARE_CONOBJECT(ActionMap )

dumpActionMap(const char * fileName, const bool append)

isAction(U32 deviceType, U32 deviceInst, U32 modifiers, U32 action)

Return true if the given event triggers is bound to an action in this map.

processAction(const InputEventInfo * )

processBind(const U32 argc, const char ** argv, SimObject * object)

processBindCmd(const char * device, const char * action, const char * makeCmd, const char * breakCmd)

processHoldBind(const char * device, const char * action, const char * holdFunc, const char * tapFunc, const U32 holdTime, const bool holdOnly, const bool returnHoldTime)

processUnbind(const char * device, const char * action, SimObject * object)

Public Static Functions

buildActionString(const InputEventInfo * event)

checkAsciiGlobal(U16 key, U32 modifiers)

Returns true if the specified key + modifiers are bound to something on the global action map.

checkBreakTable(const InputEventInfo * )

clearAllBreaks()

Called when we lose focus, to make sure we have no dangling inputs.

This fires a break event for every currently pending item in the break table.

createEventDescriptor(const char * pEventString, EventDescriptor * pDescriptor)

getDeviceName(const U32 deviceType, const U32 deviceInstance, char * buffer)

getDeviceTypeAndInstance(const char * device, U32 & deviceType, U32 & deviceInstance)

getGlobalMap()

Returns the global ActionMap.

getKeyString(const U32 action, char * buffer)

handleEvent(const InputEventInfo * )

handleEventGlobal(const InputEventInfo * )