I’m trying to make a HUD widget I can interact with using keyboard or gamepad, not unlike Splinter Cell’s “quick inventory” or “interaction” boxes. When holding a specific key (like Ctrl for “quick inventory”) I want the widget to show and take focus, and when I release that key I want the widget to hide and unfocus. However, my key input gets set to released (I’m using enhanced input if it makes a difference) when I focus my widget. Is there any way to do what I’m trying to achieve? Thanks!
Hey there @VannimonEternal! So you’ve got everything you need ready, but basically you need to externalize your logic. Right now when the UI is taking focus it’s also consuming the input. You could get around this a number of ways like making a bool that get’s flipped when you press the quick inventory, but doesn’t come off when you release it there, have logic in your menu (or anywhere else of a higher order) that will call back and release the focus whenever your operations in that menu are done or when you release the key after being held in menu.
I did it inside the widget’s “OnKeyUp” thanks!