summaryrefslogtreecommitdiffstats
path: root/tools/editor/editor_node.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-09-24 18:06:15 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-09-24 18:06:15 -0300
commit82a3304458738b410a5aff8994ce587413aeb464 (patch)
treeb54672bc649a80ebbe1e11b0488c7dfdc6c109e7 /tools/editor/editor_node.cpp
parent59e1ad27731e66c58a3d5ee9d783eac74a1d48d9 (diff)
downloadredot-engine-82a3304458738b410a5aff8994ce587413aeb464.tar.gz
Added ability to set custom mouse cursors. Not hardware accelerated yet.
Diffstat (limited to 'tools/editor/editor_node.cpp')
-rw-r--r--tools/editor/editor_node.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index 63684dcc93..14ed75d1ab 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -93,7 +93,7 @@
#include "plugins/light_occluder_2d_editor_plugin.h"
#include "plugins/color_ramp_editor_plugin.h"
#include "plugins/collision_shape_2d_editor_plugin.h"
-#include "os/input.h"
+#include "main/input_default.h"
// end
#include "tools/editor/io_plugins/editor_texture_import_plugin.h"
#include "tools/editor/io_plugins/editor_scene_import_plugin.h"
@@ -4390,11 +4390,15 @@ EditorNode::EditorNode() {
EditorHelp::generate_doc(); //before any editor classes are crated
- if (!OS::get_singleton()->has_touchscreen_ui_hint() && Input::get_singleton()) {
- //only if no touchscreen ui hint, set emulation
- InputDefault *id = Input::get_singleton()->cast_to<InputDefault>();
- if (id)
+ InputDefault *id = Input::get_singleton()->cast_to<InputDefault>();
+
+ if (id) {
+
+ if (!OS::get_singleton()->has_touchscreen_ui_hint() && Input::get_singleton()) {
+ //only if no touchscreen ui hint, set emulation
id->set_emulate_touch(false); //just disable just in case
+ }
+ id->set_custom_mouse_cursor(RES());
}