I have created a very simple test project.
Just open a widget from PlayerController, AddToViewport, and call ActivateWidget.
If I press the A button on the same frame that this widget opens, for some reason, Button 3 will hover instead of Button 1, which is assumed.
This is because there is a button in the center of the screen; if there is no button in the center of the screen, nothing will hover.
I want Button 1 to hover in all cases.
Does anyone know anything about this issue?
The bug is easily reproduced when fixed at 15 FPS.
Does this happens only when pressing button while widget opening?
I believe this is all about mouse cursor because its centered when gamepad is selected, and Confirm is triggered as mouse click. But I am not quite familiar with Common UI to help with that.
Yes.
I checked while displaying GFrameCounter and it only occurs when the button is pressed while the Widget is open (the frame that called the Activate Widget).
If it’s even one frame later, then Button 1 is correctly hovered and pressed.
And just a moment ago, I also found that it does not occur with the following code… GetOwnerSlateUser()->SetCursorPosition(-10000, -10000);
If anyone knows of a better way to do this, please comment.