Cursor Class
Namespace: Stride.Graphics.SDLAssembly: Stride.Graphics.dll
Basic operations to show, hide and load a cursor.
System.Object →
Cursor
Derived from Cursor:
public class Cursor
Name | Description | |
---|---|---|
Constructors | ||
Cursor(Byte[], Byte[], Int32, Int32, Int32, Int32) | Initialize a cursor with |
|
Properties | ||
Handle | Access to low level pointer to the SDL_Cursor struct. |
|
Position | Position of cursor on screen. |
|
Methods | ||
Hide() | Hide cursor. |
|
SetCursor(Cursor) | Set cursor with |
|
Show() | Show cursor. |
Constructors
Cursor(Byte[], Byte[], Int32, Int32, Int32, Int32)
Initialize a cursor with data
and mask
. For more details, see
https://wiki.libsdl.org/SDL_CreateCursor.
public Cursor(byte[] data, byte[] mask, int w, int h, int hot_x, int hot_y)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | data | Actual cursor image |
System.Byte[] | mask | Mask for |
System.Int32 | w | Width of cursor |
System.Int32 | h | Height of cursor |
System.Int32 | hot_x | Hotspot X coordinate of cursor |
System.Int32 | hot_y | Hotspot Y coordinate of cursor |
Properties
Handle
Access to low level pointer to the SDL_Cursor struct.
public IntPtr Handle { get; }
Property Value
Type | Description |
---|---|
System.IntPtr |
Position
Position of cursor on screen.
public static Point Position { get; set; }
Property Value
Type | Description |
---|---|
Point |
Methods
Hide()
Hide cursor.
public static void Hide()
SetCursor(Cursor)
Set cursor with cur
.
public static void SetCursor(Cursor cur)
Parameters
Type | Name | Description |
---|---|---|
Cursor | cur | New cursor to show. |
Show()
Show cursor.
public static void Show()