Mouse Cursor Override

Hey fellow devs!

I am implementing a custom mouse cursor in my game, Tower Defenders. And all was going well until I came across this annoying problem.

It seems all UI buttons force (via core scripts) the mouse icon to change to a black default cursor when hovering over them.

Is there any way around this? Otherwise I’m just going to have to make an ImageLabel act as a proxy mouse as I make the real mouse invisible. But that seems pretty sketchy. Would love some help, thanks!

Quite confused; are you saying it doesn’t allow you to make your own and overrides it with the default cursor?

1 Like

Edited the post, my bad.
And it simply changes the cursor from the custom one to the default black one when hovering over a GUI button.

I want to use my own GUI button cursor, not the default black one.

There is no override for this behaviour, you will be forced to create a custom mouse implementation. Be wary that your custom mouse will not render over CoreGuis for security reasons, so that may present you with a few behaviours you don’t want to see.

1 Like

If you want to avoid the cursor changing over buttons (though this won’t impact CoreGUI) you can implement custom buttons using Frames/Labels and the UserInputService, which can have it’s own advantages and disadvantages.

2 Likes