diff options
| author | Chance Snow <[email protected]> | 2020-10-21 03:55:52 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-10-21 10:55:52 +0200 |
| commit | 9833fe45eb5cd6cfd3593b7f4d1aae9cf7367729 (patch) | |
| tree | b231ff0cb2fc2c9ba43858f6ac7f272aa1efe077 /src/raylib.h | |
| parent | eb3e9e4df53c0908a4ae3dd91cbe0e3a42134794 (diff) | |
| download | raylib-9833fe45eb5cd6cfd3593b7f4d1aae9cf7367729.tar.gz raylib-9833fe45eb5cd6cfd3593b7f4d1aae9cf7367729.zip | |
Added desktop cursor getter and setter functions (#1407)
* [core] Added desktop cursor getter and setter functions
* Example: Set mouse cursor in text input box
* Setup standard cursors _after_ GLFW window initialization
* Remove old `int GetMouseWheelMove` declaration
Diffstat (limited to 'src/raylib.h')
| -rw-r--r-- | src/raylib.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/raylib.h b/src/raylib.h index f0eef587..bb5a3c47 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -617,6 +617,27 @@ typedef enum { MOUSE_MIDDLE_BUTTON = 2 } MouseButton; +// Mouse cursor types +typedef enum { + MOUSE_CURSOR_DEFAULT = -1, + MOUSE_CURSOR_ARROW = 0, + MOUSE_CURSOR_IBEAM = 1, + MOUSE_CURSOR_CROSSHAIR = 2, + MOUSE_CURSOR_POINTING_HAND = 3, + // The horizontal resize/move arrow shape. + MOUSE_CURSOR_RESIZE_EW = 4, + // The vertical resize/move arrow shape. + MOUSE_CURSOR_RESIZE_NS = 5, + // The top-left to bottom-right diagonal resize/move arrow shape. + MOUSE_CURSOR_RESIZE_NWSE = 6, + // The top-right to bottom-left diagonal resize/move arrow shape. + MOUSE_CURSOR_RESIZE_NESW = 7, + // The omni-directional resize/move cursor shape. + MOUSE_CURSOR_RESIZE_ALL = 8, + // The operation-not-allowed shape. + MOUSE_CURSOR_NOT_ALLOWED = 9 +} MouseCursor; + // Gamepad number typedef enum { GAMEPAD_PLAYER1 = 0, @@ -1016,6 +1037,8 @@ RLAPI void SetMousePosition(int x, int y); // Set mouse posit RLAPI void SetMouseOffset(int offsetX, int offsetY); // Set mouse offset RLAPI void SetMouseScale(float scaleX, float scaleY); // Set mouse scaling RLAPI float GetMouseWheelMove(void); // Returns mouse wheel movement Y +RLAPI MouseCursor GetMouseCursor(void); // Returns mouse cursor +RLAPI void SetMouseCursor(MouseCursor cursor); // Set mouse cursor // Input-related functions: touch RLAPI int GetTouchX(void); // Returns touch position X for touch point 0 (relative to screen size) |
