I am making a pause menu toggled by ESC key.
I want to use Enhanced Input inside widget, but it seems it only works for game inputs.
How can I make it work with “Set Input Mode Game And UI”?
P.S. I don’t want the widget key events to be dependent on its parent, rather wants fire-and-forget for widget flexibility. (There will be hundreds of widgets in future, I don’t want them all stacked up in PlayerController)
firstly…
don’t create and then remove from viewport a Pause Menu…
better change its visibility to collapsed and visible.
the enhanced input works on UI, if it has focus only. if the PlayerController is still the valid focus holder, each input will be consumed before the UI kicks in…
I would suggest using the Common UI Plugin for that job, since the EIS is not really that easy for being used in UI…
Thank you for the reply, though I really wanted the EIS to work also on widgets so I don’t have to divide input systems seperately.
Recent attempt was to use BindAction:
This can dynamically bind and unbind Action in EIS, but it suffers feature bugs described below:
I set the triger as ETriggerEvent::Started, yet it is called once again after calling RemoveBindingByHandle, which would create the widget again.
There is the option ‘Ignore All Pressed Keys Until Release’ for mapping context, but not for bindAction… so I’m still looking for an alternative.