ScummVM API documentation
Common::Action Struct Reference

Public Member Functions

 Action (const char *id, const U32String &description)
 
void setEvent (const Event &evt)
 
void setEvent (const EventType evtType)
 
void setCustomBackendActionEvent (const CustomEventType evtType)
 
void setCustomBackendActionAxisEvent (const CustomEventType evtType)
 
void setCustomEngineActionEvent (const CustomEventType evtType)
 
void setKeyEvent (const KeyState &ks)
 
void setLeftClickEvent ()
 
void setMiddleClickEvent ()
 
void setRightClickEvent ()
 
void setMouseWheelUpEvent ()
 
void setMouseWheelDownEvent ()
 
void setX1ClickEvent ()
 
void setX2ClickEvent ()
 
void allowKbdRepeats ()
 
bool shouldTriggerOnKbdRepeats () const
 
void addDefaultInputMapping (const String &hwId)
 
const Array< String > & getDefaultInputMapping () const
 

Public Attributes

const char * id
 
U32String description
 
Event event
 

Member Function Documentation

◆ allowKbdRepeats()

void Common::Action::allowKbdRepeats ( )
inline

Allows an action bound to a keyboard event to be repeatedly triggered by key repeats

Note that key repeat events should probably not be used for anything else than text input as they do not trigger when the action is bound to something else than a keyboard key. Furthermore, the frequency at which they trigger and whether they trigger at all is operating system controlled.

◆ addDefaultInputMapping()

void Common::Action::addDefaultInputMapping ( const String hwId)

Add a default input mapping for the action

Unknown hardware inputs will be silently ignored. Having keyboard bindings by default will not cause trouble on devices without a keyboard.

Parameters
hwIdHardware input identifier as registered with the keymapper

Member Data Documentation

◆ id

const char* Common::Action::id

unique id used for saving/loading to config

◆ description

U32String Common::Action::description

Human readable description

◆ event

Event Common::Action::event

Event to be sent when mapped key is pressed


The documentation for this struct was generated from the following file: