In my current project I am trying to use Nifty to “toggle” between a game hub and a specific gui element. For example every time I press the key “M” I want to open an overview about my stats. If I press the key “M” again, the overview goes away and my game hub is on the screen again. No problems so far. The problem starts if I hit a close button on the overview which is also a way to open the hub again. If I am pressing the key “M” now, nothing happens. Only after another press on the key opens the overview. I am still new to Nifty, so I have absolut no clues about what I am doing wrong.
Could it be that you mess up something in the handler of close button ? I don’t know maybe forgot to update the activeScreen variable? By the way for this user cases popups also play well but you can do also as you made :).
Thanks for your reply. As far as I know the click action ignores to update the activeScreen variable somehow. It seems like the click interaction opens a seperate object of my screencontroller. I used the debug modus and it shows that the activeScreen is still “true” after clicking the start button.