2017-09-13 04:42:36 +08:00
<?xml version="1.0" encoding="UTF-8" ?>
2019-04-01 18:33:56 +08:00
<class name= "InputMap" inherits= "Object" category= "Core" version= "3.2" >
2017-09-13 04:42:36 +08:00
<brief_description >
2017-10-16 06:07:13 +08:00
Singleton that manages [InputEventAction].
2017-09-13 04:42:36 +08:00
</brief_description>
<description >
2017-11-18 08:29:32 +08:00
Manages all [InputEventAction] which can be created/modified from the project settings menu [code]Project > Project Settings > Input Map[/code] or in code with [method add_action] and [method action_add_event]. See [method Node._input].
2017-09-13 04:42:36 +08:00
</description>
<tutorials >
2018-11-05 15:46:27 +08:00
<link > https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html#inputmap</link>
2017-09-13 04:42:36 +08:00
</tutorials>
<methods >
<method name= "action_add_event" >
<return type= "void" >
</return>
<argument index= "0" name= "action" type= "String" >
</argument>
<argument index= "1" name= "event" type= "InputEvent" >
</argument>
<description >
2017-10-16 06:07:13 +08:00
Adds an [InputEvent] to an action. This [InputEvent] will trigger the action.
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "action_erase_event" >
<return type= "void" >
</return>
<argument index= "0" name= "action" type= "String" >
</argument>
<argument index= "1" name= "event" type= "InputEvent" >
</argument>
<description >
2017-10-16 06:07:13 +08:00
Removes an [InputEvent] from an action.
2017-09-13 04:42:36 +08:00
</description>
</method>
2018-05-12 15:38:00 +08:00
<method name= "action_erase_events" >
<return type= "void" >
</return>
<argument index= "0" name= "action" type= "String" >
</argument>
<description >
2018-08-19 12:29:12 +08:00
Removes all events from an action.
2018-05-12 15:38:00 +08:00
</description>
</method>
2017-09-13 04:42:36 +08:00
<method name= "action_has_event" >
<return type= "bool" >
</return>
<argument index= "0" name= "action" type= "String" >
</argument>
<argument index= "1" name= "event" type= "InputEvent" >
</argument>
<description >
2018-08-19 12:29:12 +08:00
Returns [code]true[/code] if the action has the given [InputEvent] associated with it.
2017-09-13 04:42:36 +08:00
</description>
</method>
2018-05-12 15:38:00 +08:00
<method name= "action_set_deadzone" >
<return type= "void" >
</return>
2018-08-21 06:35:30 +08:00
<argument index= "0" name= "action" type= "String" >
2018-05-12 15:38:00 +08:00
</argument>
2018-08-21 06:35:30 +08:00
<argument index= "1" name= "deadzone" type= "float" >
2018-05-12 15:38:00 +08:00
</argument>
<description >
</description>
</method>
2017-09-13 04:42:36 +08:00
<method name= "add_action" >
<return type= "void" >
</return>
<argument index= "0" name= "action" type= "String" >
</argument>
2018-05-12 15:38:00 +08:00
<argument index= "1" name= "deadzone" type= "float" default= "0.5" >
</argument>
2017-09-13 04:42:36 +08:00
<description >
2019-03-30 06:37:35 +08:00
Adds an empty action to the [InputMap] with a configurable [code]deadzone[/code].
2018-05-12 15:38:00 +08:00
An [InputEvent] can then be added to this action with [method action_add_event].
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "erase_action" >
<return type= "void" >
</return>
<argument index= "0" name= "action" type= "String" >
</argument>
<description >
2019-03-30 06:37:35 +08:00
Removes an action from the [InputMap].
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "event_is_action" qualifiers= "const" >
<return type= "bool" >
</return>
<argument index= "0" name= "event" type= "InputEvent" >
</argument>
<argument index= "1" name= "action" type= "String" >
</argument>
<description >
2019-01-07 17:02:04 +08:00
Returns [code]true[/code] if the given event is part of an existing action. This method ignores keyboard modifiers if the given [InputEvent] is not pressed (for proper release detection). See [method action_has_event] if you don't want this behavior.
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "get_action_list" >
<return type= "Array" >
</return>
<argument index= "0" name= "action" type= "String" >
</argument>
<description >
2017-10-16 06:07:13 +08:00
Returns an array of [InputEvent]s associated with a given action.
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "get_actions" >
<return type= "Array" >
</return>
<description >
2019-03-30 06:37:35 +08:00
Returns an array of all actions in the [InputMap].
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "has_action" qualifiers= "const" >
<return type= "bool" >
</return>
<argument index= "0" name= "action" type= "String" >
</argument>
<description >
2019-03-30 06:37:35 +08:00
Returns [code]true[/code] if the [InputMap] has a registered action with the given name.
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "load_from_globals" >
<return type= "void" >
</return>
<description >
2019-03-30 06:37:35 +08:00
Clears all [InputEventAction] in the [InputMap] and load it anew from [ProjectSettings].
2017-09-13 04:42:36 +08:00
</description>
</method>
</methods>
<constants >
</constants>
</class>