Table of Contents

Class Cursor

Namespace
Stride.Graphics.SDL
Assembly
Stride.Graphics.dll

Basic operations to show, hide and load a cursor.

public class Cursor
Inheritance
Cursor

Constructors

Cursor(byte[], byte[], int, int, int, int)

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

data byte[]

Actual cursor image

mask byte[]

Mask for data

w int

Width of cursor

h int

Height of cursor

hot_x int

Hotspot X coordinate of cursor

hot_y int

Hotspot Y coordinate of cursor

Properties

Handle

Access to low level pointer to the SDL_Cursor struct.

public nint Handle { get; }

Property Value

nint

Position

Position of cursor on screen.

public static Point Position { get; set; }

Property Value

Point

Methods

Hide()

Hide cursor.

public static void Hide()

SetCursor(Cursor)

Set cursor with cur.

public static void SetCursor(Cursor cur)

Parameters

cur Cursor

New cursor to show.

Show()

Show cursor.

public static void Show()