You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using a scene as an inventory window, so it is above another scene.
I have a image object that acts as a button, with setInteractive({ useHandCursor: true }); attached.
When I try to close the scene with scene.sleep() by clicking the button, the cursor remains as 'pointer'.
I expected the cursor to be 'default' when the scene is not active anymore.
Example Test Code
classTest1extendsPhaser.Scene{constructor(){super('test1')}create(){scene.launch('test2');}}classTest2extendsPhaser.Scene{constructor(){super('test2')}create(){constcloseButton=this.add.rectangle(0,0,200,200);closeButton.setInteractive({useHandCursor: true});closeButton.on('pointerdown',()=>{this.scale.canvas.style.cursor='default';// I had to manually change the cursor.this.scene.sleep();});}}constgame=newPhaser.Game({type: Phaser.AUTO,width: 800,height: 800,backgroundColor: '#111111',scale: {mode: Phaser.Scale.FIT,autoCenter: Phaser.Scale.CENTER_BOTH},scene: [Test1,Test2]})
The text was updated successfully, but these errors were encountered:
jhoryong
changed the title
Curosr does not change even after scene visibility set to off.
Curosr does not change even after scene visibility set to off
Dec 17, 2024
jhoryong
changed the title
Curosr does not change even after scene visibility set to off
Curosr does not change even after scene sleep
Dec 18, 2024
Version
Description
I am using a scene as an inventory window, so it is above another scene.
I have a image object that acts as a button, with
setInteractive({ useHandCursor: true });
attached.When I try to close the scene with
scene.sleep()
by clicking the button, the cursor remains as 'pointer'.I expected the cursor to be 'default' when the scene is not active anymore.
Example Test Code
The text was updated successfully, but these errors were encountered: