Cursor cannot be permanently hidden

In my project, there is more complex interactive logic, so I want to handle the mouse cursor myself and hide the native one.

I tried to use ‘Set Show Mouse Cursor’ node and set the ‘Cursor’ option as ‘None’ in the widget.
However, when I click on and leave the button, the native cursor appears. As shown in the below video (The red one is the correct cursor, and the arrow is the native cursor with a custom image. Also, the input mode is game and UI).

I found that this problem seems to be related to the button widget. If I set ‘Is Focusable’ to False in the button’s detail, the cursor will be correctly hidden.
Does it work as intended? Or a bug?

Is this for this very button or for the user widget that hosts it only?

Is this how you’re doing it?

image

Or some other way?

I’m not a native speaker and do not fully understand your meaning.
But I will try to explain more clearly.

In the video, the widget only contains one child (two descendants), the button with a text. And the widget is placed in a actor’s widget component with screen space setting.
I set the ‘Cursor’ option as ‘None’ on the text, the button, and the widget. Therefore, the engine cursor did not appear when I clicked the button.

No, I implement the cursor by adding a whole screen widget with a cursor widget which is followed the mouse’s viewport position.
(The ‘Cursor’ options of these widgets are also set to ‘None’, too.)

I set the ‘Cursor’ option as ‘None’ on the text, the button, and the widget.

All the elements of the widget then. :+1:


Could you test if this would work here; in the widget:

image

image


Buttons are notoriously finicky to work with. What you’ve described and shown should not be happening if the Player Controller does, indeed, hide the cursor.

there is more complex interactive logic

Is there any other script / actor / widget in your project manipulating / effecting hardware cursor and its visibility?

Not working :joy:

I will test this problem on a blank project later. For now, I think that I just can set all buttons as non-focusable.

1 Like

Do tell if you find out what is causing the cursor to pop back up.

Not working

Does it trigger? Does it print, for example?