This feature I think would go along way, say you have a Input Action to open and close your inventory within your character or player controller and you want to lock the game input but you don’t want to lock all inputs within your blueprint because some are used for UI events? you should be able to just tick the inputs you want to be able to Override this lock.
feel free to comment and leave your feedback, I’m hopping a Epic Dev sees the reason in this feature and how useful it would be.
Honestly this isn’t really a good idea because a “locked” UI state is actually far more complex than it seems at first. If it’s exactly what you want though, and your menu pauses the game, there are a couple of ways to do this. In BP when you add an input event you can select it and tick “Enabled when Paused” (Or something like that). But usually what you do is have “Set Input Mode UI Only” (Or Game and UI) and have your widgets handle your input directly.
Now from there there are again several things you can do because widgets take the raw key and axis input, not your actions.What we do in our project is have one master widget that a) keeps track of a window stack of other widgets to know to whom to route any user input and b) receives all the inputs, does stuff like deadzone filtering etc. then maps that input to a “UI Action” (Just a big enum of all valid UI actions that we have) and forwards that to whichever widget is on top of our window stack. So our widgets just override this “On UI Event” function and implement the logic.There is more finesse to it than this of course (mostly having to deal with overcoming UE4’s widget focusing circus) but the main takeaway is that you want to process your raw inputs as early as possible in a centralized location then send events to the rest of your UI.
I don’t see it being complex its just overriding a command similar to what the other override does when paused, my inventory doesn’t pauses the game and setting it to Game Or UI isn’t a solution not when 95% of your action inputs aren’t for the UI, yes you can do it the messy way and override it in UMG but thats a huge mess if you have a lot of widgets and each one takes the focus and you would need to override the same input for all these widgets, using a interface or call back isn’t a great solution more a work around.
No it’s actually the exact solution and I just explained how to overcome the “lot of widgets and each one takes focus and you need to override the same input for all these widgets”. Only handle all of that in a master widget, then convert that input into an action which you then pipe down to whatever widget is currently “active”. You can either make your own widget stack system to keep track which widget is currently active or you can wrangle the widget focus system, that one is up to you.