[v4.8.dev7+] - Custom Mouse Cursor? - Need Bigger Mouse Cursor For 4K Displays

Godot Version

v4.8.dev7.official [c971f93e7] Linux x86_64 desktop

Question

Does Godot Engine v4.8.dev7 support custom mouse cursors?
We released one of our games on Flathub (Linux) and people with 4K displays say cursor is too small.
If someone could post a GDScript example then that would be helpful thank you!

NOTE: Above must work on Linux x86_64, Linux arm64, and Web HTML5.

Savant Savior

Yes, with limitations:

But you probably need to configure the flatpak correctly so it can access the system’s cursors instead of using a custom cursor.

Hi,

We made a bigger custom cursor.

Works great on Linux, but there is an issue on Web HTML5 version of our game?

Please view Web HTML5 version of game on itch Indie game distribution site below:

The custom cursor goes away at the right and bottom sides of the Web HTML5 game’s window in itch??

Any help would be greatly appreciated, thank you in advance!

Savant Savior

Mouse cursor is 128x128 pixels.

How we implemented custom mouse cursor in Godot:

It’s a platform limitation. Nothing you can do as far as I know:

https://stackoverflow.com/questions/58414589/css-custom-cursor-image-is-reverting-near-edges-of-the-viewport-in-chrome

Hi,

What if I have a fully transparent custom cursor and then just draw a cursor sprite?
Would the above work on Web HTML5 ?

Thanks…

You can use a software cursor. It will be less responsive than a hardware cursor as the latter is managed by the OS directly and not tied to your render loop. It probably won’t matter for the most part.

Hi, got everything working…We think :stuck_out_tongue: