123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
- .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
- .. _class_InputMap:
- InputMap
- ========
- **Inherits:** :ref:`Object<class_object>`
- **Category:** Core
- Brief Description
- -----------------
- Singleton that manages actions.
- Member Functions
- ----------------
- +------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`action_add_event<class_InputMap_action_add_event>` **(** :ref:`String<class_string>` action, :ref:`InputEvent<class_inputevent>` event **)** |
- +------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`action_erase_event<class_InputMap_action_erase_event>` **(** :ref:`String<class_string>` action, :ref:`InputEvent<class_inputevent>` event **)** |
- +------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`action_has_event<class_InputMap_action_has_event>` **(** :ref:`String<class_string>` action, :ref:`InputEvent<class_inputevent>` event **)** |
- +------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`add_action<class_InputMap_add_action>` **(** :ref:`String<class_string>` action **)** |
- +------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`erase_action<class_InputMap_erase_action>` **(** :ref:`String<class_string>` action **)** |
- +------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`event_is_action<class_InputMap_event_is_action>` **(** :ref:`InputEvent<class_inputevent>` event, :ref:`String<class_string>` action **)** const |
- +------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_string>` | :ref:`get_action_from_id<class_InputMap_get_action_from_id>` **(** :ref:`int<class_int>` id **)** const |
- +------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_action_id<class_InputMap_get_action_id>` **(** :ref:`String<class_string>` action **)** const |
- +------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Array<class_array>` | :ref:`get_action_list<class_InputMap_get_action_list>` **(** :ref:`String<class_string>` action **)** |
- +------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Array<class_array>` | :ref:`get_actions<class_InputMap_get_actions>` **(** **)** |
- +------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`has_action<class_InputMap_has_action>` **(** :ref:`String<class_string>` action **)** const |
- +------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`load_from_globals<class_InputMap_load_from_globals>` **(** **)** |
- +------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
- Description
- -----------
- Singleton that manages actions. InputMap has a list of the actions used in InputEvent, which can be modified.
- Member Function Description
- ---------------------------
- .. _class_InputMap_action_add_event:
- - void **action_add_event** **(** :ref:`String<class_string>` action, :ref:`InputEvent<class_inputevent>` event **)**
- Add an :ref:`InputEvent<class_inputevent>` to an action. This :ref:`InputEvent<class_inputevent>` will trigger the action.
- .. _class_InputMap_action_erase_event:
- - void **action_erase_event** **(** :ref:`String<class_string>` action, :ref:`InputEvent<class_inputevent>` event **)**
- Remove an :ref:`InputEvent<class_inputevent>` from an action.
- .. _class_InputMap_action_has_event:
- - :ref:`bool<class_bool>` **action_has_event** **(** :ref:`String<class_string>` action, :ref:`InputEvent<class_inputevent>` event **)**
- Whether an action has an :ref:`InputEvent<class_inputevent>` associated with it.
- .. _class_InputMap_add_action:
- - void **add_action** **(** :ref:`String<class_string>` action **)**
- Add an (empty) action to the :ref:`InputMap<class_inputmap>`. An :ref:`InputEvent<class_inputevent>` can then be added to this action with :ref:`action_add_event<class_InputMap_action_add_event>`.
- .. _class_InputMap_erase_action:
- - void **erase_action** **(** :ref:`String<class_string>` action **)**
- Remove an action from the :ref:`InputMap<class_inputmap>`.
- .. _class_InputMap_event_is_action:
- - :ref:`bool<class_bool>` **event_is_action** **(** :ref:`InputEvent<class_inputevent>` event, :ref:`String<class_string>` action **)** const
- Return whether the given event is part of an existing action.
- .. _class_InputMap_get_action_from_id:
- - :ref:`String<class_string>` **get_action_from_id** **(** :ref:`int<class_int>` id **)** const
- Return the action corresponding to the identifier.
- .. _class_InputMap_get_action_id:
- - :ref:`int<class_int>` **get_action_id** **(** :ref:`String<class_string>` action **)** const
- Return the identifier of the given action.
- .. _class_InputMap_get_action_list:
- - :ref:`Array<class_array>` **get_action_list** **(** :ref:`String<class_string>` action **)**
- Return an array of InputEvents associated with a given action.
- .. _class_InputMap_get_actions:
- - :ref:`Array<class_array>` **get_actions** **(** **)**
- Return an array of all actions in the :ref:`InputMap<class_inputmap>`.
- .. _class_InputMap_has_action:
- - :ref:`bool<class_bool>` **has_action** **(** :ref:`String<class_string>` action **)** const
- Whether this InputMap has a registered action with the given name.
- .. _class_InputMap_load_from_globals:
- - void **load_from_globals** **(** **)**
- Clear the :ref:`InputMap<class_inputmap>` and load it anew from :ref:`Globals<class_globals>`.
|