summaryrefslogtreecommitdiff
path: root/main/input_default.cpp
diff options
context:
space:
mode:
authorGuilherme Felipe <guilhermefelipecgs@gmail.com>2018-04-09 17:48:24 -0300
committerGuilherme Felipe <guilhermefelipecgs@gmail.com>2018-04-10 11:38:34 -0300
commit4f05190fb08b064b8605ab80cba74aee38e52702 (patch)
tree9ac4369738c103f2d022c9824027a9d802d5ad86 /main/input_default.cpp
parent48890b15c5b5ff54ea2cf416a9d3157f2d5dee5b (diff)
Implement Input.set_default_cursor_shape to change the default shape
Closes #18043
Diffstat (limited to 'main/input_default.cpp')
-rw-r--r--main/input_default.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/main/input_default.cpp b/main/input_default.cpp
index ae33057959..1c73ecf2d2 100644
--- a/main/input_default.cpp
+++ b/main/input_default.cpp
@@ -495,6 +495,15 @@ bool InputDefault::is_emulating_touchscreen() const {
return emulate_touch;
}
+Input::CursorShape InputDefault::get_default_cursor_shape() {
+ return default_shape;
+}
+
+void InputDefault::set_default_cursor_shape(CursorShape p_shape) {
+ default_shape = p_shape;
+ OS::get_singleton()->set_cursor_shape((OS::CursorShape)p_shape);
+}
+
void InputDefault::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) {
if (Engine::get_singleton()->is_editor_hint())
return;