Button press changes software cursor mode

I have an UI with a button which changes the mouse cursor appearance / mode.

After clicking the button, the cursor appearance does not change instantly but I need to click somewhere on the screen to get the correct widget. This behavior is the same for any button click in the game (cursor changes, clicking somewhere else corrects it).

My guesses are that either the software cursor mode is changed by the button press or clicking buttons in the UI somehow disables the cursor mode.

The new mode is set in the player controller as follows (Widget calls a function in the player controller):


Here is how the cursor is specified:

1 Like

I solved the problem by calling Set Focus to Game Viewport node in widget, after each click. Worked fine on my scenario.