Preload Custom Cursors


#1

I have been looking for a way to customize the mouse cursor for my phaser game. I found examples in labs.phaser.io but all three of them do not preload the cursors. On slow connections, the mouse cursor becomes invisible until it gets loaded. So, how do I preload them or is there another fix for this?


#2

Hi @rebenely,
You can apply a css class to the game container:

.myCssClass {
  cursor: url(assets/imgs/cursor.png), auto;
}

Regards.


#3

Works great, thank you!