From a392dbdbe3f67d42698e47399421fbdf6ae5c90a Mon Sep 17 00:00:00 2001 From: Guilherme Silva Date: Fri, 10 Nov 2017 08:50:11 -0200 Subject: Add implementation for custom hardware cursor --- core/os/input.h | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'core/os/input.h') diff --git a/core/os/input.h b/core/os/input.h index 97d3bef4f9..a4efc64c69 100644 --- a/core/os/input.h +++ b/core/os/input.h @@ -51,6 +51,28 @@ public: MOUSE_MODE_CONFINED }; +#undef CursorShape + enum CursorShape { + CURSOR_ARROW, + CURSOR_IBEAM, + CURSOR_POINTING_HAND, + CURSOR_CROSS, + CURSOR_WAIT, + CURSOR_BUSY, + CURSOR_DRAG, + CURSOR_CAN_DROP, + CURSOR_FORBIDDEN, + CURSOR_VSIZE, + CURSOR_HSIZE, + CURSOR_BDIAGSIZE, + CURSOR_FDIAGSIZE, + CURSOR_MOVE, + CURSOR_VSPLIT, + CURSOR_HSPLIT, + CURSOR_HELP, + CURSOR_MAX + }; + void set_mouse_mode(MouseMode p_mode); MouseMode get_mouse_mode() const; @@ -96,7 +118,7 @@ public: virtual bool is_emulating_touchscreen() const = 0; - virtual void set_custom_mouse_cursor(const RES &p_cursor, const Vector2 &p_hotspot = Vector2()) = 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; virtual String get_joy_button_string(int p_button) = 0; @@ -110,5 +132,6 @@ public: }; VARIANT_ENUM_CAST(Input::MouseMode); +VARIANT_ENUM_CAST(Input::CursorShape); #endif // INPUT_H -- cgit v1.2.3