From f515071edc31340bc92b2dbc52301f54980bdfbf Mon Sep 17 00:00:00 2001 From: Lennard Date: Tue, 9 Jun 2020 23:33:32 +0200 Subject: [PATCH] Renamed InputMap.get_action_list to InputMap.get_action_events --- core/input/input_map.cpp | 8 ++++---- core/input/input_map.h | 4 ++-- doc/classes/InputMap.xml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/input/input_map.cpp b/core/input/input_map.cpp index 3cb4b43a26a..ac032b7d103 100644 --- a/core/input/input_map.cpp +++ b/core/input/input_map.cpp @@ -48,7 +48,7 @@ void InputMap::_bind_methods() { 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_events", "action"), &InputMap::action_erase_events); - ClassDB::bind_method(D_METHOD("get_action_list", "action"), &InputMap::_get_action_list); + ClassDB::bind_method(D_METHOD("action_get_events", "action"), &InputMap::_action_get_events); ClassDB::bind_method(D_METHOD("event_is_action", "event", "action"), &InputMap::event_is_action); ClassDB::bind_method(D_METHOD("load_from_globals"), &InputMap::load_from_globals); } @@ -152,9 +152,9 @@ void InputMap::action_erase_events(const StringName &p_action) { input_map[p_action].inputs.clear(); } -Array InputMap::_get_action_list(const StringName &p_action) { +Array InputMap::_action_get_events(const StringName &p_action) { Array ret; - const List> *al = get_action_list(p_action); + const List> *al = action_get_events(p_action); if (al) { for (const List>::Element *E = al->front(); E; E = E->next()) { ret.push_back(E->get()); @@ -164,7 +164,7 @@ Array InputMap::_get_action_list(const StringName &p_action) { return ret; } -const List> *InputMap::get_action_list(const StringName &p_action) { +const List> *InputMap::action_get_events(const StringName &p_action) { const Map::Element *E = input_map.find(p_action); if (!E) { return nullptr; diff --git a/core/input/input_map.h b/core/input/input_map.h index 3abc224ccfd..548553ed318 100644 --- a/core/input/input_map.h +++ b/core/input/input_map.h @@ -56,7 +56,7 @@ private: List>::Element *_find_event(Action &p_action, const Ref &p_event, bool *p_pressed = nullptr, float *p_strength = nullptr) const; - Array _get_action_list(const StringName &p_action); + Array _action_get_events(const StringName &p_action); Array _get_actions(); protected: @@ -76,7 +76,7 @@ public: void action_erase_event(const StringName &p_action, const Ref &p_event); void action_erase_events(const StringName &p_action); - const List> *get_action_list(const StringName &p_action); + const List> *action_get_events(const StringName &p_action); bool event_is_action(const Ref &p_event, const StringName &p_action) const; bool event_get_action_status(const Ref &p_event, const StringName &p_action, bool *p_pressed = nullptr, float *p_strength = nullptr) const; diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml index da93d7fb53d..842c69de27d 100644 --- a/doc/classes/InputMap.xml +++ b/doc/classes/InputMap.xml @@ -95,7 +95,7 @@ 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. - +