Computer Science Canada Turing GUI Buttons Won't Clear |
Author: | RowanV [ Sat May 03, 2014 12:49 pm ] | ||
Post subject: | Turing GUI Buttons Won't Clear | ||
Hey everyone, I am still somewhat new to Turing, and I've been having trouble with my game. I made a series of buttons (a main menu) and one of the buttons on the main menu goes to another set of buttons (a level selector). My problem is that the buttons from the original menu don't go away, they are registered when clicked as opposed to the new buttons, no matter how much I try to get rid of them using commands like dispose, disable, hide, and cls. I made this sample to show you the most basic form of my problem. Help please!
|
Author: | Tony [ Sat May 03, 2014 2:30 pm ] | ||||
Post subject: | Re: Turing GUI Buttons Won't Clear | ||||
RowanV @ Sat May 03, 2014 12:49 pm wrote: I made this sample to show you the most basic form of my problem.
This is the best way to get help with figuring out problems.
Here, GUI.Dispose is positioned after an infinite loop. The loop will not exit until GUI.Quit is called (See GUI.ProcessEvent), but such is not available in your example. The documentation on GUI.Dispose provides an example that should work. You might not want to actually use GUI.Quit, as it will disable all ProcessEvent calls. You can exit your loops via your own conditions
|
Author: | ocaber12 [ Wed Dec 09, 2015 7:33 pm ] |
Post subject: | RE:Turing GUI Buttons Won\'t Clear |
how do I have multiple buttons on one screen? |
Author: | Insectoid [ Wed Dec 09, 2015 10:59 pm ] |
Post subject: | RE:Turing GUI Buttons Won\'t Clear |
Just create more than one button. Use GUI.CreateButton twice to get two different buttons. |