mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Rename InputFilter back to Input
It changed name as part of the DisplayServer and input refactoring in #37317, with the rationale that input no longer goes through the main loop, so the previous Input singleton now only does filtering. But the gains in consistency are quite limited in the renaming, and it breaks compatibility for all scripts and tutorials that access the Input singleton via the scripting language. A temporary option was suggested to keep the scripting singleton named `Input` even if its type is `InputFilter`, but that adds inconsistency and breaks C#. Fixes godotengine/godot-proposals#639. Fixes #37319. Fixes #37690.
This commit is contained in:
parent
39f7a40925
commit
fdf58a5858
82 changed files with 482 additions and 480 deletions
|
@ -32,7 +32,7 @@
|
|||
|
||||
#include "core/engine.h"
|
||||
#include "core/global_constants.h"
|
||||
#include "core/input/input_filter.h"
|
||||
#include "core/input/input.h"
|
||||
#include "core/os/os.h"
|
||||
#include "core/project_settings.h"
|
||||
#include "scene/main/node.h"
|
||||
|
@ -3870,16 +3870,16 @@ public:
|
|||
|
||||
switch (mode) {
|
||||
case VisualScriptInputAction::MODE_PRESSED: {
|
||||
*p_outputs[0] = InputFilter::get_singleton()->is_action_pressed(action);
|
||||
*p_outputs[0] = Input::get_singleton()->is_action_pressed(action);
|
||||
} break;
|
||||
case VisualScriptInputAction::MODE_RELEASED: {
|
||||
*p_outputs[0] = !InputFilter::get_singleton()->is_action_pressed(action);
|
||||
*p_outputs[0] = !Input::get_singleton()->is_action_pressed(action);
|
||||
} break;
|
||||
case VisualScriptInputAction::MODE_JUST_PRESSED: {
|
||||
*p_outputs[0] = InputFilter::get_singleton()->is_action_just_pressed(action);
|
||||
*p_outputs[0] = Input::get_singleton()->is_action_just_pressed(action);
|
||||
} break;
|
||||
case VisualScriptInputAction::MODE_JUST_RELEASED: {
|
||||
*p_outputs[0] = InputFilter::get_singleton()->is_action_just_released(action);
|
||||
*p_outputs[0] = Input::get_singleton()->is_action_just_released(action);
|
||||
} break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue