Skip to content

Commit

Permalink
Merge pull request #50065 from SirQuartz/patch-1
Browse files Browse the repository at this point in the history
Add `action_get_deadzone()` method to `InputMap`
  • Loading branch information
akien-mga authored Jul 2, 2021
2 parents eefe276 + c6f28ed commit 276f256
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/input/input_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ void InputMap::_bind_methods() {
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_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_has_event", "action", "event"), &InputMap::action_has_event);
ClassDB::bind_method(D_METHOD("action_erase_event", "action", "event"), &InputMap::action_erase_event);
Expand Down
9 changes: 9 additions & 0 deletions doc/classes/InputMap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@
Removes all events from an action.
</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>
Expand Down

0 comments on commit 276f256

Please sign in to comment.