Need Help With Menu Item In Loop
Author |
Message |
Siavash
|
Posted: Mon Apr 06, 2009 6:03 pm Post subject: Need Help With Menu Item In Loop |
|
|
I made a animated program that is in an infinite loop and I need to use the GUI.CreateMenu command in my loop with menu items. I've done that, but how can have it in the loop so that is updates the Menu instead of having it create a MenuItem each time it goes through the loop? |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Dusk Eagle

|
Posted: Mon Apr 06, 2009 6:30 pm Post subject: Re: Need Help With Menu Item In Loop |
|
|
It'd be really helpful to see the code before we attempt to answer your question. Type in [syntax="turing"] [/syntax] and stick the code in between the pairs of square brackets. |
|
|
|
|
 |
Siavash
|
Posted: Mon Apr 06, 2009 7:05 pm Post subject: Re: Need Help With Menu Item In Loop |
|
|
if i put :first := GUI.CreateMenu ("First") and item := GUI.CreateMenuItem (name, GUI.Quit) in the loop, it creates new menu each time and if i dont (like example), it goes away |
|
|
|
|
 |
Dusk Eagle

|
Posted: Tue Apr 07, 2009 11:45 pm Post subject: Re: Need Help With Menu Item In Loop |
|
|
I'll admit to not being familiar with Turing's GUI. Therefore, the method I suggest may not be the best way, but it will get the job done.
Remove the cls, View.Update, and offscreenonly commands. Now, every time through the loop, before you update the box's variables, draw a background-color colored box in the same location as you drew your last black box. This will prevent the GUI from ever being cleared from the screen, as you will never call cls in the first place. |
|
|
|
|
 |
Siavash
|
|
|
|
 |
|
|