Issues with input modes and UI's

That’s the same as me bar the fact that it’s been over 4 years instead. You’re having issues with this because there is quite a bit to wrap one’s head around.

A bit strange for *take damage *to affect UI functionality. Consider giving the desired UI element *focus *when opening the inventory. Set Input Mode UI Only node has an extra pin that allows focusing on a specific widget. Make sure that the widget root is flagged as IsFocusable.

That’s definitely problem with the logic. Most likely because the input mode has been set to UI only or something else is consuming the input. See below.

That’s the correct behaviour. *UI Only Mode *will prevent the player controller (or anything that’s not a widget) from handling input. Do not use *FlipFlop *here. Open the menu normally, make sure it’s in focus:

To close it, override O*n Key Down *in the widget:


Do note that the widget has to be in focus for this to work and you need to click in the widget’s visible area. Clicking the game world outside of the widget will make it lose focus, for example. To fix that you can force a widget to maintain focus no matter what by:

focusLost.PNG

With this, I’m able to run around, open & close inventory with the same key and run some more. You will need some extra bits and bobs if you need to interact with the world & the UI at the same time.

2 Likes