diff options
author | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2020-12-22 09:50:29 +0000 |
---|---|---|
committer | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2020-12-22 12:34:57 +0000 |
commit | d9e9eb8d048bbec5941fa684a5e56d5edc5954d0 (patch) | |
tree | f455ebfe310ddfa68e1927decc0c044c6f2de239 /core/input | |
parent | 6532596d97d90474738283e0f2662719d10aaac0 (diff) |
Rename MainLoop methods to match Node methods
Diffstat (limited to 'core/input')
-rw-r--r-- | core/input/input.cpp | 10 | ||||
-rw-r--r-- | core/input/input.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/core/input/input.cpp b/core/input/input.cpp index 153656e44a..9209908704 100644 --- a/core/input/input.cpp +++ b/core/input/input.cpp @@ -247,7 +247,7 @@ bool Input::is_action_just_pressed(const StringName &p_action) const { if (Engine::get_singleton()->is_in_physics_frame()) { return E->get().pressed && E->get().physics_frame == Engine::get_singleton()->get_physics_frames(); } else { - return E->get().pressed && E->get().idle_frame == Engine::get_singleton()->get_idle_frames(); + return E->get().pressed && E->get().process_frame == Engine::get_singleton()->get_process_frames(); } } @@ -260,7 +260,7 @@ bool Input::is_action_just_released(const StringName &p_action) const { if (Engine::get_singleton()->is_in_physics_frame()) { return !E->get().pressed && E->get().physics_frame == Engine::get_singleton()->get_physics_frames(); } else { - return !E->get().pressed && E->get().idle_frame == Engine::get_singleton()->get_idle_frames(); + return !E->get().pressed && E->get().process_frame == Engine::get_singleton()->get_process_frames(); } } @@ -588,7 +588,7 @@ void Input::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool p_is_em if (!p_event->is_echo() && is_action_pressed(E->key()) != p_event->is_action_pressed(E->key())) { Action action; action.physics_frame = Engine::get_singleton()->get_physics_frames(); - action.idle_frame = Engine::get_singleton()->get_idle_frames(); + action.process_frame = Engine::get_singleton()->get_process_frames(); action.pressed = p_event->is_action_pressed(E->key()); action.strength = 0.0f; action.raw_strength = 0.0f; @@ -714,7 +714,7 @@ void Input::action_press(const StringName &p_action, float p_strength) { Action action; action.physics_frame = Engine::get_singleton()->get_physics_frames(); - action.idle_frame = Engine::get_singleton()->get_idle_frames(); + action.process_frame = Engine::get_singleton()->get_process_frames(); action.pressed = true; action.strength = p_strength; @@ -725,7 +725,7 @@ void Input::action_release(const StringName &p_action) { Action action; action.physics_frame = Engine::get_singleton()->get_physics_frames(); - action.idle_frame = Engine::get_singleton()->get_idle_frames(); + action.process_frame = Engine::get_singleton()->get_process_frames(); action.pressed = false; action.strength = 0.f; diff --git a/core/input/input.h b/core/input/input.h index 1b2df49ac0..39dc0bceff 100644 --- a/core/input/input.h +++ b/core/input/input.h @@ -114,7 +114,7 @@ private: struct Action { uint64_t physics_frame; - uint64_t idle_frame; + uint64_t process_frame; bool pressed; float strength; float raw_strength; |