Legomite Posted June 19, 2018 Share Posted June 19, 2018 Is there currently a way to change the mouse cursor on demand? I want the cursor to change during a pointer down event, so far it appears that the only way to show a new cursor is by hovering. If anybody could help, that'd be awesome Link to comment Share on other sites More sharing options...
samid737 Posted June 19, 2018 Share Posted June 19, 2018 You could fetch the game canvas and change its CSS cursor property. e.g: game.canvas.style.cursor = "zoom-in" //or this.sys.canvas.style.cursor = "zoom-in" Legomite 1 Link to comment Share on other sites More sharing options...
rich Posted June 19, 2018 Share Posted June 19, 2018 Just change the default cursor: this.input.setDefaultCursor() That will change the cursor immediately (but it will still allow it to be overridden by hover cursors) samid737 and Legomite 2 Link to comment Share on other sites More sharing options...
B3L7 Posted June 19, 2018 Share Posted June 19, 2018 (edited) this.input.setDefaultCursor('url(assets/input/cursors/blue.cur), pointer'); https://labs.phaser.io/edit.html?src=src/input/cursors/custom cursor.js EDIT: Rich beat me to it. Edited June 19, 2018 by B3L7 Legomite and samid737 2 Link to comment Share on other sites More sharing options...
Recommended Posts