Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    Cursor Class

    Namespace: Stride.Graphics.SDL
    Assembly: 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 data and mask. For more details, see https://wiki.libsdl.org/SDL_CreateCursor.

    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 cur.

    Show()

    Show cursor.

    | Improve this Doc View Source

    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 data

    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

    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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()

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation