[Solved] Always keep mouse cursor hidden?

Hi everyone,

Every time I open a widget, the mouse cursor will show up, anyone knows how to keep the mouse cursor always hidden?

I have tried with the “Show Mouse Cursor” bool node, but its not working, the mouse shows up anyway :frowning:

possible duplicated: https://forums.unrealengine.com/t/hide-mouse-widget-confusion/428952 (image link broken)

Every widget can control cursor behaviour like so:

image

You’d set it to None for elements you wish not to display the cursor. The feature is well hidden in an Advanced Panel indicated with a white downward facing arrow.


Do tell if you get it to work the way you need. There could an exception where the widget has no focus and simply does not know where the cursor is. But then the controller’s Show Mouse Cursor bool node would suffice.

2 Likes

Thanks again @Everynone
Its working! :slight_smile: :+1:

Just one more thing, would be recommended to create all the widgets within the HUD class instead of create the widgets inside different blueprint (eg: player controller class, actor class)?

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

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.

2 Likes

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 :

I just want to hide the OS cursor :slight_smile:

@Everynone thanks a lot, you are a wonderful person! Really appreciate all the help :star2: :sun_with_face:

1 Like