Cursor


Object Hierarchy:

Object hierarchy for Cursor

Description:

[ Compact ]
[ CCode ( free_function = "sfCursor_destroy" ) ]
public class Cursor

Cursor defines the appearance of a system cursor.

Warning Features related to Cursor are not supported on iOS and Android. This class abstracts the operating system resources associated with either a native system cursor or a custom cursor.

After loading the cursor the graphical appearance with either fromPixels() or fromSystem(), the cursor can be changed with sf.Window.setMouseCursor().

The behaviour is undefined if the cursor is destroyed while in use by the window.

Usage example:

var window = new Window(......);

// ... create window as usual ...

Cursor cursor;
if (cursor = Cursor.fromSystem(sf.CursorType.Hand))
window.setMouseCursor(cursor);

See also:

sf.Window.setMouseCursor


Namespace: sf
Package: sfml

Content:

Creation methods: