Download

Widget Input Issue

Hey Everyone, just a quick one I hope.

I have a widget and when I do something in that widget it opens another smaller widget (basically just a progress bar) on top of it for a couple of seconds then it closes and goes back to the original widget.

My issue is when this happens, I can press enter on the keyboard and my underlying widget accepts the input which I don’t want it to as it keeps opening the second widget each time.
So what I want to do, is while the second widget is opened (the one with the progress bar), I don’t want any inputs accepted from user until it closes.

Is there an easy way to do this without hiding the original widget and then unhiding it when the second widget closes?

Thanks.

Various way to do this i think, depend on your project.
The fastest way is to add a bool and set it to true when you show the popup and check if it is false to open the popup.
Or Maybe you can “set user focus” to your popup widget, if that don’t work try to override “On Key Char” “On Key Down” with an “Handle” answer in the popup widget.

As ElFab said, the branch and bool would be the easiest.
In your player controlled pawn, set up the boolean and a “active widget” variable.
When the widget is opened, cast to player and change boolean. When you open the loading bar, turn the bool off and on the closing of the loading bar, set the boolean back to true.

I think the issue is with the user Focus. As soon as i am able, i will try what you guys suggested and see how it goes. Thanks.

EDIT : So it turns out, it was a Focus issue. All i had to do was set focus to the Popup widget and this fixed my issue. Thanks again.