You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Add get_dead_zone() method to InputMap
This commit adds a new method to the `InputMap`, allowing the user to get the value of an action's dead zone as a float.
This commit is contained in:
@@ -45,6 +45,7 @@ void InputMap::_bind_methods() {
|
|||||||
ClassDB::bind_method(D_METHOD("erase_action", "action"), &InputMap::erase_action);
|
ClassDB::bind_method(D_METHOD("erase_action", "action"), &InputMap::erase_action);
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("action_set_deadzone", "action", "deadzone"), &InputMap::action_set_deadzone);
|
ClassDB::bind_method(D_METHOD("action_set_deadzone", "action", "deadzone"), &InputMap::action_set_deadzone);
|
||||||
|
ClassDB::bind_method(D_METHOD("action_get_deadzone", "action"), &InputMap::action_get_deadzone);
|
||||||
ClassDB::bind_method(D_METHOD("action_add_event", "action", "event"), &InputMap::action_add_event);
|
ClassDB::bind_method(D_METHOD("action_add_event", "action", "event"), &InputMap::action_add_event);
|
||||||
ClassDB::bind_method(D_METHOD("action_has_event", "action", "event"), &InputMap::action_has_event);
|
ClassDB::bind_method(D_METHOD("action_has_event", "action", "event"), &InputMap::action_has_event);
|
||||||
ClassDB::bind_method(D_METHOD("action_erase_event", "action", "event"), &InputMap::action_erase_event);
|
ClassDB::bind_method(D_METHOD("action_erase_event", "action", "event"), &InputMap::action_erase_event);
|
||||||
|
|||||||
@@ -41,6 +41,15 @@
|
|||||||
Removes all events from an action.
|
Removes all events from an action.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</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">
|
<method name="action_get_events">
|
||||||
<return type="Array">
|
<return type="Array">
|
||||||
</return>
|
</return>
|
||||||
|
|||||||
Reference in New Issue
Block a user