Phaser API Documentation

  Version: 
setCursor(interactiveObject)

Description:

Sets a custom cursor on the parent canvas element of the game, based on the cursor setting of the given Interactive Object (i.e. a Sprite).

See the CSS property cursor for more information on MDN:

https://developer.mozilla.org/en-US/docs/Web/CSS/cursor

Parameters:

name type description
interactiveObject Phaser.Types.Input.InteractiveObject

The Interactive Object that will set the cursor on the canvas.

Since: 3.85.0
Source: src/input/InputPlugin.js (Line 541)