Hi! I waned to show menu tab when I press escape key and when I press escape key again, then back to game. It works but I should click on menu to focus on menu and click on game to switch to game. and this is the blueprint.
When you set input to UI Only, the Player Controller can no longer process input - that’s why the FlipFlop won’t fire again. The widget in focus has now the exclusivity and it should be the widget that shuts itself down and restores the appropriate input mode. Consider the following:
You can grant widgets focus and even make them keyboard focusable. This becomes indispensable when you open a menu and want to start typing straightaway rather than painstakingly attempt to select a field to type in.
You gave full control to the widget via UI only mode - this means the controller is not processing input anymore and we can’t have it involved in this scenario. It simply no longer knows what is going on with the keys and would always return False here.
Instead of the controller, compare == the Get Key to what is needed here.
Thanks, it now handles the key inputs and can close the widget, but now how do I return the player controller to the character? After exiting the widget now is the character that does not respond.
I found the error, changing the Input mode changes the Mouse Capture Mode so it wasn’t behaving as I expected. Using “Set Mouse Capture Method” to Capture permanently including initial solves it.