So I am developing an Electron app using Phaser 3. Instead of using URLs to import images, I tend to use import because all the assets are copied / flattened by Electron. So to load an image I do something like this:
import pointer ‘(@assets/images/pointers/pointer.png’)
And then later load the image like this:
this.scene.load.image(“pointer”, pointer);
The problem is, I can’t use a URL with Electron / setDefaultCursor. The below doesn’t work and I don’t know what to do instead:
this.input.setDefaultCursor(
‘url(assets/images/pointers/pointer.png), pointer’
)
Is there some other way of setting the cursor to an image if I can’t use a URL because of Electron?