ActionConfigSyncAgent
Responsible for synchronization of shortcuts between multiple shortcut config nodes.
Description
Every action defined through the InputMapApi has its own ActionConfigSyncAgent created. It is used by the ModConfigApi to ensure shortcut config nodes displaying the same shortcut stay synchronized with eachother.
Methods
void | add_event ( InputEventKey event ) |
void | added_item ( ) |
void | deleted_item ( int index ) |
String | get_action ( ) |
Array | get_action_list ( ) |
bool | is_saved ( ) |
void | switch ( InputEventKey from, InputEventKey to, int index ) |
Signals
switched ( InputEventKey from, InputEventKey to, int index ):
Emitted when switch ( InputEventKey from, InputEventKey to, int index ) is called when a shortcut is changed in a shortcut config and forwards the parameters. from and to are the previous and new InputEventKey respectively. index is the index of the item changed in the actions event list indexed by their order in the config tree.
deleted ( int index ):
Emitted when deleted_item ( int index ) is called when a shortcut is deleted in a shortcut config and forwards the parameters. index denotes the index of the item deleted in the actions event list indexed by their order in the config tree.
added ( ):
Emitted when added_item ( ) is called when a shortcut is deleted in a shortcut config and forwards the parameters.
Method Descriptions
String get_action ( ):
Returns the action this ActionConfigSyncAgent handles as a String.
Array get_action_list ( ):
Retuns the InputEvent Array bound to this ActionConfigSyncAgents action.
void switch ( InputEventKey from, InputEventKey to, int index ):
Emits switched ( InputEventKey from, InputEventKey to, int index ). Call to indicate that at the index from has been switched with to.
void deleted_item ( int index ):
Emits deleted ( int index ). Call to indicate that the shortcut at index has been cleared.
void added_item ( ):
Emits added ( ). Call to indicate that a new shortcut has been added to this ActionConfigSyncAgents action.
void add_event ( InputEventKey event ):
Adds event to this ActionConfigSyncAgents action.
bool is_saved ( ):
Returns a bool that indicates whether the action is being saved to any config. Shortcut config nodes only allow modifying shortcuts that are actually being saved.