diff options
author | Guilherme Felipe <guilhermefelipecgs@gmail.com> | 2018-04-09 17:48:24 -0300 |
---|---|---|
committer | Guilherme Felipe <guilhermefelipecgs@gmail.com> | 2018-04-10 11:38:34 -0300 |
commit | 4f05190fb08b064b8605ab80cba74aee38e52702 (patch) | |
tree | 9ac4369738c103f2d022c9824027a9d802d5ad86 /core | |
parent | 48890b15c5b5ff54ea2cf416a9d3157f2d5dee5b (diff) |
Implement Input.set_default_cursor_shape to change the default shape
Closes #18043
Diffstat (limited to 'core')
-rw-r--r-- | core/os/input.cpp | 1 | ||||
-rw-r--r-- | core/os/input.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/core/os/input.cpp b/core/os/input.cpp index 1d7cd7c791..e8a635e1b5 100644 --- a/core/os/input.cpp +++ b/core/os/input.cpp @@ -85,6 +85,7 @@ void Input::_bind_methods() { ClassDB::bind_method(D_METHOD("warp_mouse_position", "to"), &Input::warp_mouse_position); ClassDB::bind_method(D_METHOD("action_press", "action"), &Input::action_press); ClassDB::bind_method(D_METHOD("action_release", "action"), &Input::action_release); + ClassDB::bind_method(D_METHOD("set_default_cursor_shape", "shape"), &Input::set_default_cursor_shape, DEFVAL(CURSOR_ARROW)); ClassDB::bind_method(D_METHOD("set_custom_mouse_cursor", "image", "shape", "hotspot"), &Input::set_custom_mouse_cursor, DEFVAL(CURSOR_ARROW), DEFVAL(Vector2())); ClassDB::bind_method(D_METHOD("parse_input_event", "event"), &Input::parse_input_event); diff --git a/core/os/input.h b/core/os/input.h index 9c7595ff7f..fca68f27b7 100644 --- a/core/os/input.h +++ b/core/os/input.h @@ -119,6 +119,8 @@ public: virtual bool is_emulating_touchscreen() const = 0; + virtual CursorShape get_default_cursor_shape() = 0; + virtual void set_default_cursor_shape(CursorShape p_shape) = 0; virtual void set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape = CURSOR_ARROW, const Vector2 &p_hotspot = Vector2()) = 0; virtual void set_mouse_in_window(bool p_in_window) = 0; |