summaryrefslogtreecommitdiff
path: root/core/os/input.h
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-01-03 08:35:59 +0100
committerGitHub <noreply@github.com>2018-01-03 08:35:59 +0100
commit6322b0bbb7fec1e6574f0bb09c99647472ef3a52 (patch)
tree235aab52e666b4619c940bb1765a76ad2649cfc7 /core/os/input.h
parent2c226e4edf720ebbadf355e244b27082ca01f330 (diff)
parenta392dbdbe3f67d42698e47399421fbdf6ae5c90a (diff)
Merge pull request #12814 from guilhermefelipecgs/add_hardware_custom_cursor
Custom hardware-accelerated mouse cursor
Diffstat (limited to 'core/os/input.h')
-rw-r--r--core/os/input.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/core/os/input.h b/core/os/input.h
index 608484ccd0..140d11de4d 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