Click or drag to resize

InputSetCustomMouseCursor Method

Sets a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing null to the image parameter resets to the system cursor. See InputCursorShape for the list of shapes.

image's size must be lower than 256×256.

hotspot must be within image's size.

Note: AnimatedTextures aren't supported as custom mouse cursors. If using an AnimatedTexture, only the first frame will be displayed.

Note: Only images imported with the Lossless, Lossy or Uncompressed compression modes are supported. The Video RAM compression mode can't be used for custom cursors.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public static void SetCustomMouseCursor(
	Resource image,
	InputCursorShape shape = InputCursorShape.Arrow,
	Vector2? hotspot = null
)

Parameters

image
Type: GodotResource

[Missing <param name="image"/> documentation for "M:Godot.Input.SetCustomMouseCursor(Godot.Resource,Godot.Input.CursorShape,System.Nullable{Godot.Vector2})"]

shape (Optional)
Type: GodotInputCursorShape

[Missing <param name="shape"/> documentation for "M:Godot.Input.SetCustomMouseCursor(Godot.Resource,Godot.Input.CursorShape,System.Nullable{Godot.Vector2})"]

hotspot (Optional)
Type: SystemNullableVector2
If the parameter is null, then the default value is new Vector2(0, 0)
See Also