Skip to content

Class Cursor

Definition

Namespace: StardewUI.Graphics
Assembly: StardewUI.dll

Defines a cursor that can be drawn instead of or in addition to the regular mouse pointer.

public record Cursor : IEquatable<StardewUI.Graphics.Cursor>

Inheritance
Object ⇦ Cursor

Implements
IEquatable<Cursor>

Members

Constructors

Name Description
Cursor(Sprite, Point?, Point?, Color?) Defines a cursor that can be drawn instead of or in addition to the regular mouse pointer.

Fields

Name Description
DefaultOffset The default offset to apply when Offset is not specified.
DefaultTint The default color to tint with when Tint is not specified.

Properties

Name Description
EqualityContract
Offset Offset from the exact mouse position where the sprite should be drawn. This always refers to the top-left corner of the sprite. If not specified, uses DefaultOffset.
Size Size with which to draw the Sprite, if different from the size of the sprite's SourceRect.
Sprite The sprite to draw.
Tint Tint color for the sprite. If not specified, uses DefaultTint.

Details

Constructors

Cursor(Sprite, Point?, Point?, Color?)

Defines a cursor that can be drawn instead of or in addition to the regular mouse pointer.

public Cursor(StardewUI.Graphics.Sprite Sprite, Microsoft.Xna.Framework.Point? Size, Microsoft.Xna.Framework.Point? Offset, Microsoft.Xna.Framework.Color? Tint);
Parameters

Sprite   Sprite
The sprite to draw.

Size   Nullable<Point>
Size with which to draw the Sprite, if different from the size of the sprite's SourceRect.

Offset   Nullable<Point>
Offset from the exact mouse position where the sprite should be drawn. This always refers to the top-left corner of the sprite. If not specified, uses DefaultOffset.

Tint   Nullable<Color>
Tint color for the sprite. If not specified, uses DefaultTint.


Fields

DefaultOffset

The default offset to apply when Offset is not specified.

public static readonly Microsoft.Xna.Framework.Point DefaultOffset;
Field Value

Point


DefaultTint

The default color to tint with when Tint is not specified.

public static readonly Microsoft.Xna.Framework.Color DefaultTint;
Field Value

Color


Properties

EqualityContract

protected System.Type EqualityContract { get; }
Property Value

Type


Offset

Offset from the exact mouse position where the sprite should be drawn. This always refers to the top-left corner of the sprite. If not specified, uses DefaultOffset.

public Microsoft.Xna.Framework.Point? Offset { get; set; }
Property Value

Nullable<Point>


Size

Size with which to draw the Sprite, if different from the size of the sprite's SourceRect.

public Microsoft.Xna.Framework.Point? Size { get; set; }
Property Value

Nullable<Point>


Sprite

The sprite to draw.

public StardewUI.Graphics.Sprite Sprite { get; set; }
Property Value

Sprite


Tint

Tint color for the sprite. If not specified, uses DefaultTint.

public Microsoft.Xna.Framework.Color? Tint { get; set; }
Property Value

Nullable<Color>