Issue with the Flip Flop on Esc Key for Pause menu

Hello Guys I have been working on my personal project. I have made a pause menu with the flip flop on ESC key. The issue I am facing is there is also a button in the UI for the Resume game. Now the issue is whenever I click on resume game. The flip



for (is A == false) doesnt trigger and it messed up the flip flop. I have resolved it with 4 if checks on flip-flop. The question is there any better way to do it? Thank you in advance!

Hm, pretty chaotic and likely to become a little debugging nightmare early on. May I suggest you get rid of the FlipFlop and roll with a boolean for now:

Have the onClick call a Custom Event.


Do note that you do not reference the widgets; removing them from parent / container will get them destroyed. This will reset the state of any variables they had. At least ensure the controlling widget does not get removed.

Yes you are right and it is chaotic :3. Actually i am new to this and trying on my own to get out of these problems :stuck_out_tongue: