virtualx-engine/doc/classes/InputMap.xml

145 lines
4.6 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8" ?>
2020-02-01 02:03:48 +01:00
<class name="InputMap" inherits="Object" version="4.0">
<brief_description>
2017-10-16 00:07:13 +02:00
Singleton that manages [InputEventAction].
</brief_description>
<description>
Manages all [InputEventAction] which can be created/modified from the project settings menu [b]Project &gt; Project Settings &gt; Input Map[/b] or in code with [method add_action] and [method action_add_event]. See [method Node._input].
</description>
<tutorials>
<link title="InputEvent: InputMap">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html#inputmap</link>
</tutorials>
<methods>
<method name="action_add_event">
<return type="void">
</return>
<argument index="0" name="action" type="StringName">
</argument>
<argument index="1" name="event" type="InputEvent">
</argument>
<description>
2017-10-16 00:07:13 +02:00
Adds an [InputEvent] to an action. This [InputEvent] will trigger the action.
</description>
</method>
<method name="action_erase_event">
<return type="void">
</return>
<argument index="0" name="action" type="StringName">
</argument>
<argument index="1" name="event" type="InputEvent">
</argument>
<description>
2017-10-16 00:07:13 +02:00
Removes an [InputEvent] from an action.
</description>
</method>
2018-05-12 09:38:00 +02:00
<method name="action_erase_events">
<return type="void">
</return>
<argument index="0" name="action" type="StringName">
2018-05-12 09:38:00 +02:00
</argument>
<description>
2018-08-19 06:29:12 +02:00
Removes all events from an action.
2018-05-12 09:38:00 +02:00
</description>
</method>
<method name="action_get_deadzone">
<return type="float">
</return>
<argument index="0" name="action" type="StringName">
</argument>
<description>
Returns a deadzone value for the action.
</description>
</method>
<method name="action_get_events">
<return type="Array">
</return>
<argument index="0" name="action" type="StringName">
</argument>
<description>
Returns an array of [InputEvent]s associated with a given action.
</description>
</method>
<method name="action_has_event">
<return type="bool">
</return>
<argument index="0" name="action" type="StringName">
</argument>
<argument index="1" name="event" type="InputEvent">
</argument>
<description>
2018-08-19 06:29:12 +02:00
Returns [code]true[/code] if the action has the given [InputEvent] associated with it.
</description>
</method>
2018-05-12 09:38:00 +02:00
<method name="action_set_deadzone">
<return type="void">
</return>
<argument index="0" name="action" type="StringName">
2018-05-12 09:38:00 +02:00
</argument>
2018-08-21 00:35:30 +02:00
<argument index="1" name="deadzone" type="float">
2018-05-12 09:38:00 +02:00
</argument>
<description>
Sets a deadzone value for the action.
2018-05-12 09:38:00 +02:00
</description>
</method>
<method name="add_action">
<return type="void">
</return>
<argument index="0" name="action" type="StringName">
</argument>
2018-05-12 09:38:00 +02:00
<argument index="1" name="deadzone" type="float" default="0.5">
</argument>
<description>
Adds an empty action to the [InputMap] with a configurable [code]deadzone[/code].
2018-05-12 09:38:00 +02:00
An [InputEvent] can then be added to this action with [method action_add_event].
</description>
</method>
<method name="erase_action">
<return type="void">
</return>
<argument index="0" name="action" type="StringName">
</argument>
<description>
Removes an action from the [InputMap].
</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="StringName">
</argument>
<argument index="2" name="exact_match" type="bool" default="false">
</argument>
<description>
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.
</description>
</method>
<method name="get_actions">
<return type="Array">
</return>
<description>
Returns an array of all actions in the [InputMap].
</description>
</method>
<method name="has_action" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="action" type="StringName">
</argument>
<description>
Returns [code]true[/code] if the [InputMap] has a registered action with the given name.
</description>
</method>
2020-11-23 23:44:44 +01:00
<method name="load_from_project_settings">
<return type="void">
</return>
<description>
Clears all [InputEventAction] in the [InputMap] and load it anew from [ProjectSettings].
</description>
</method>
</methods>
<constants>
</constants>
</class>