summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-04-28 16:20:20 +0200
committerGitHub <noreply@github.com>2020-04-28 16:20:20 +0200
commitd44c5cfcf72eec2fbf76afe6fd9e43ee3bcab216 (patch)
tree4ce75cb592dbf7ce1f367f778a8b3b306727b2f8 /servers
parentb9e58ed5b869cf2caf946be9a5e3b9066e1387eb (diff)
parentfdf58a585839804c89798392dd93025dbe8654e4 (diff)
Merge pull request #38295 from akien-mga/input-is-back
Rename InputFilter back to Input
Diffstat (limited to 'servers')
-rw-r--r--servers/display_server.cpp26
-rw-r--r--servers/display_server.h10
-rw-r--r--servers/xr/xr_positional_tracker.cpp3
3 files changed, 20 insertions, 19 deletions
diff --git a/servers/display_server.cpp b/servers/display_server.cpp
index da1a68a179..ff8b10cbb6 100644
--- a/servers/display_server.cpp
+++ b/servers/display_server.cpp
@@ -30,7 +30,7 @@
#include "display_server.h"
-#include "core/input/input_filter.h"
+#include "core/input/input.h"
#include "scene/resources/texture.h"
DisplayServer *DisplayServer::singleton = nullptr;
@@ -164,7 +164,7 @@ float DisplayServer::screen_get_scale(int p_screen) const {
bool DisplayServer::screen_is_touchscreen(int p_screen) const {
//return false;
- return InputFilter::get_singleton() && InputFilter::get_singleton()->is_emulating_touch_from_mouse();
+ return Input::get_singleton() && Input::get_singleton()->is_emulating_touch_from_mouse();
}
void DisplayServer::screen_set_keep_on(bool p_enable) {
@@ -563,31 +563,31 @@ DisplayServer *DisplayServer::create(int p_index, const String &p_rendering_driv
return server_create_functions[p_index].create_function(p_rendering_driver, p_mode, p_flags, p_resolution, r_error);
}
-void DisplayServer::_input_set_mouse_mode(InputFilter::MouseMode p_mode) {
+void DisplayServer::_input_set_mouse_mode(Input::MouseMode p_mode) {
singleton->mouse_set_mode(MouseMode(p_mode));
}
-InputFilter::MouseMode DisplayServer::_input_get_mouse_mode() {
- return InputFilter::MouseMode(singleton->mouse_get_mode());
+Input::MouseMode DisplayServer::_input_get_mouse_mode() {
+ return Input::MouseMode(singleton->mouse_get_mode());
}
void DisplayServer::_input_warp(const Vector2 &p_to_pos) {
singleton->mouse_warp_to_position(p_to_pos);
}
-InputFilter::CursorShape DisplayServer::_input_get_current_cursor_shape() {
- return (InputFilter::CursorShape)singleton->cursor_get_shape();
+Input::CursorShape DisplayServer::_input_get_current_cursor_shape() {
+ return (Input::CursorShape)singleton->cursor_get_shape();
}
-void DisplayServer::_input_set_custom_mouse_cursor_func(const RES &p_image, InputFilter::CursorShape p_shape, const Vector2 &p_hostspot) {
+void DisplayServer::_input_set_custom_mouse_cursor_func(const RES &p_image, Input::CursorShape p_shape, const Vector2 &p_hostspot) {
singleton->cursor_set_custom_image(p_image, (CursorShape)p_shape, p_hostspot);
}
DisplayServer::DisplayServer() {
singleton = this;
- InputFilter::set_mouse_mode_func = _input_set_mouse_mode;
- InputFilter::get_mouse_mode_func = _input_get_mouse_mode;
- InputFilter::warp_mouse_func = _input_warp;
- InputFilter::get_current_cursor_shape_func = _input_get_current_cursor_shape;
- InputFilter::set_custom_mouse_cursor_func = _input_set_custom_mouse_cursor_func;
+ Input::set_mouse_mode_func = _input_set_mouse_mode;
+ Input::get_mouse_mode_func = _input_get_mouse_mode;
+ Input::warp_mouse_func = _input_warp;
+ Input::get_current_cursor_shape_func = _input_get_current_cursor_shape;
+ Input::set_custom_mouse_cursor_func = _input_set_custom_mouse_cursor_func;
}
DisplayServer::~DisplayServer() {
}
diff --git a/servers/display_server.h b/servers/display_server.h
index 93db7ef844..f6ba26fc6f 100644
--- a/servers/display_server.h
+++ b/servers/display_server.h
@@ -32,7 +32,7 @@
#define DISPLAY_SERVER_H
#include "core/callable.h"
-#include "core/input/input_filter.h"
+#include "core/input/input.h"
#include "core/os/os.h"
#include "core/resource.h"
@@ -61,11 +61,11 @@ public:
typedef Vector<String> (*GetRenderingDriversFunction)();
private:
- static void _input_set_mouse_mode(InputFilter::MouseMode p_mode);
- static InputFilter::MouseMode _input_get_mouse_mode();
+ static void _input_set_mouse_mode(Input::MouseMode p_mode);
+ static Input::MouseMode _input_get_mouse_mode();
static void _input_warp(const Vector2 &p_to_pos);
- static InputFilter::CursorShape _input_get_current_cursor_shape();
- static void _input_set_custom_mouse_cursor_func(const RES &, InputFilter::CursorShape, const Vector2 &p_hostspot);
+ static Input::CursorShape _input_get_current_cursor_shape();
+ static void _input_set_custom_mouse_cursor_func(const RES &, Input::CursorShape, const Vector2 &p_hostspot);
protected:
static void _bind_methods();
diff --git a/servers/xr/xr_positional_tracker.cpp b/servers/xr/xr_positional_tracker.cpp
index 808b0a608f..20853c9027 100644
--- a/servers/xr/xr_positional_tracker.cpp
+++ b/servers/xr/xr_positional_tracker.cpp
@@ -29,7 +29,8 @@
/*************************************************************************/
#include "xr_positional_tracker.h"
-#include "core/input/input_filter.h"
+
+#include "core/input/input.h"
void XRPositionalTracker::_bind_methods() {
BIND_ENUM_CONSTANT(TRACKER_HAND_UNKNOWN);