summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/input_default.cpp9
-rw-r--r--main/input_default.h3
2 files changed, 12 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;
diff --git a/main/input_default.h b/main/input_default.h
index 7de6d3eca0..384b04cf41 100644
--- a/main/input_default.h
+++ b/main/input_default.h
@@ -115,6 +115,7 @@ class InputDefault : public Input {
SpeedTrack mouse_speed_track;
Map<int, Joypad> joy_names;
int fallback_mapping;
+ CursorShape default_shape = CURSOR_ARROW;
public:
enum HatMask {
@@ -225,6 +226,8 @@ public:
void set_emulate_touch(bool p_emulate);
virtual bool is_emulating_touchscreen() const;
+ virtual CursorShape get_default_cursor_shape();
+ virtual void set_default_cursor_shape(CursorShape p_shape);
virtual void set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape = Input::CURSOR_ARROW, const Vector2 &p_hotspot = Vector2());
virtual void set_mouse_in_window(bool p_in_window);