Closed
Description
Version
- Phaser Version: >3.70
- Operating system: All
- Browser: All
Description
After a disableInteractive() on a game object cursor doesn't refresh to original state. Despite removeInteractive() works correctly.
Example Test Code
class Example extends Phaser.Scene {
constructor() {
super();
}
preload() {
}
create() {
const rect = this.add.rectangle(200, 200, 50, 50, 0xff0000);
rect.setInteractive({ cursor: 'pointer' });
rect.on('pointerdown', () => { rect.disableInteractive() });
//rect.on('pointerdown', () => { rect.removeInteractive() });
}
}
const config = {
type: Phaser.AUTO,
width: 800,
height: 600,
backgroundColor: '#2d2d2d',
parent: 'phaser-example',
pixelArt: true,
scene: Example
};
const game = new Phaser.Game(config);