[Solved] Always keep mouse cursor hidden?

There is a reason why one would want that but that has more to do with managing all widgets in a single framework class accessible from anywhere in your code - can be nifty. And the HUD has some cool functionality you can’t get anywhere else.

Because now I have to change the mouse cursor behaviour on each of my widget bps

You’d still need to set it up for every widget anyway, I think.


Once you flag the root’s cursor as None, the children (buttons, border, text) will respect that or can override it. So you could play with this programmatically:

Give each widget an interface, fetch them all and set their cursor to none. Or call it for every widget that you create. But that’s already a lot of clicking.


Perhaps you could create an empty, blank widget with the cursor set to none and have all other widgets inherit from that:

image

This will now become a default setting for the root. But that’s as much clicking as setting it manually.


Another way:

image

Create a widget that is transparent and use it as a cursor.


At this point I’m not sure if you do not want mouse-widget interaction or simply want to hide the cursor but be able to interact with widgets. Perhaps you can just make the root not hit testable:

In which case the inheritance method mentioned above would work well.

3 Likes