I can’t seem to find a decent solution to my issue regarding UI and input modes for a small RTS-style game.
My main hassle seems to be related to the fact that I want keyboard inputs to be working ALL the time. I don’t want the UI to steal controls once something is clicked and have to click again in the viewport to regain controls. Obviously though, a click on the interface should still prevent a click in the “world” context (like selecting a unit), but nothing more.
For instance I have a small spell icon on the bottom on the screen. I’d like to be able to click on it, hold the spell “under my cursor”, move freely around the map with the keyboard still, and click on the screen a single time to cast the spell at the location under cursor.
I tried numerous ways, using both Set Input Game Only and Set Input UI/Game Mode. Forcing Setting Set Input Game Only after any click on the interface seemed to give me a starting point but still there was a hiccup in the keyboard inputs and to click the interface seemed to require two clicks somehow.
I’m really not sure how to proceed here. Any help?
Solved : turn off “isFocusable” in a widget and it’ll no longer steal keyboard input.