As stated on the Mouse.Icon
API page:
this property is overridden when the mouse is hovering over a
GuiButton
.
There’s a few problems here.
That’s simply wrong.
(This is more of a #platform-feedback:developer-hub issue but it’s relevant here. Let me know if I should make a separate thread for it.)
It doesn’t override on hovering, it overrides when you press down (MouseButton1Down and MouseButton2Down both trigger it) and then goes back to your set Mouse.Icon
after you manually move your mouse again to cause a refresh. Then it does the same thing for MouseButton1/2Up.
This is awful behavior.
The entire point of Mouse.Icon
is to allow custom cursors, yet the main usage of a cursor (clicking on buttons) resets your custom cursor to the default.
It should be super simple to fix. Just check if Mouse.Icon
has been set to something before displaying the GuiButton cursor.
Video Demonstration:
For bonus points, add Mouse.IconClicking
or something like that to let developers customize that cursor state as well.
My current workaround is to hide the mouse and have an ImageLabel constantly set to Mouse.X
and Mouse.Y
positions. I shouldn’t need a whole new mouse object just to reliably change the icon when Mouse.Icon
exists for this.