You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
Refactored input, goes all via windows now.
Also renamed Input to InputFilter because all it does is filter events.
This commit is contained in:
committed by
Juan Linietsky
parent
9e08742de8
commit
8e6960a69e
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "core/crypto/crypto.h"
|
||||
#include "core/debugger/engine_debugger.h"
|
||||
#include "core/input/input.h"
|
||||
#include "core/input/input_filter.h"
|
||||
#include "core/input/input_map.h"
|
||||
#include "core/io/file_access_network.h"
|
||||
#include "core/io/file_access_pack.h"
|
||||
@@ -89,7 +89,7 @@
|
||||
// Initialized in setup()
|
||||
static Engine *engine = NULL;
|
||||
static ProjectSettings *globals = NULL;
|
||||
static Input *input = NULL;
|
||||
static InputFilter *input = NULL;
|
||||
static InputMap *input_map = NULL;
|
||||
static TranslationServer *translation_server = NULL;
|
||||
static Performance *performance = NULL;
|
||||
@@ -1225,7 +1225,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
|
||||
|
||||
/* Initialize Input */
|
||||
|
||||
input = memnew(Input);
|
||||
input = memnew(InputFilter);
|
||||
|
||||
/* Iniitalize Display Server */
|
||||
|
||||
@@ -1379,7 +1379,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
|
||||
GLOBAL_DEF("application/config/windows_native_icon", String());
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("application/config/windows_native_icon", PropertyInfo(Variant::STRING, "application/config/windows_native_icon", PROPERTY_HINT_FILE, "*.ico"));
|
||||
|
||||
Input *id = Input::get_singleton();
|
||||
InputFilter *id = InputFilter::get_singleton();
|
||||
if (id) {
|
||||
if (bool(GLOBAL_DEF("input_devices/pointing/emulate_touch_from_mouse", false)) && !(editor || project_manager)) {
|
||||
|
||||
@@ -1414,7 +1414,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
|
||||
Ref<Texture2D> cursor = ResourceLoader::load(ProjectSettings::get_singleton()->get("display/mouse_cursor/custom_image"));
|
||||
if (cursor.is_valid()) {
|
||||
Vector2 hotspot = ProjectSettings::get_singleton()->get("display/mouse_cursor/custom_image_hotspot");
|
||||
Input::get_singleton()->set_custom_mouse_cursor(cursor, Input::CURSOR_ARROW, hotspot);
|
||||
InputFilter::get_singleton()->set_custom_mouse_cursor(cursor, InputFilter::CURSOR_ARROW, hotspot);
|
||||
}
|
||||
}
|
||||
#ifdef TOOLS_ENABLED
|
||||
@@ -2009,7 +2009,6 @@ bool Main::start() {
|
||||
DisplayServer::get_singleton()->set_icon(icon);
|
||||
}
|
||||
|
||||
Input::get_singleton()->set_main_loop(main_loop);
|
||||
OS::get_singleton()->set_main_loop(main_loop);
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user