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?
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.
Could you test if this would work here; in the widget:
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?