Posted: Mon Jan 05, 2015 4:22 pm Post subject: I Need Help With Gui Buttons! Whenever I Apply, There Is This Glitch Where In Next Procedure Buttons Are Still There!

I mean the screen is clear, but when you move the mouse to where they were positioned, there is a problem where the buttons are still working when they are not suppose to. Could you help me with disabling these buttons?

% Status
infont:=Font.New("Times New Romen:14")
Draw.Text("Hello Everybody! I'm the developer of this game. My name is Shivang. My class", 30,490,infont,0)
Draw.Text("Hello Everybody! I'm the developer of this game. My name is Shivang. My class", 29,489,infont,22)
Draw.Text("is GVSS_Tajalli _ ICS2O. This program was completed on December 29, 2014.", 30,470,infont,0)
Draw.Text("is GVSS_Tajalli _ ICS2O. This program was completed on December 29, 2014.", 29,469,infont,22)
Draw.Text("You can refer to me as Master-Awesome or Special Cinema. I programmed ", 30,450,infont,0)
Draw.Text("You can refer to me as Master-Awesome or Special Cinema. I programmed ", 29,449,infont,22)
Draw.Text("this game. It wasn't easy. The characters and backgrounds are found from", 30,430,infont,0)
Draw.Text("this game. It wasn't easy. The characters and backgrounds are found from", 29,429,infont,22)
Draw.Text("Google images. The jump effect comes from gravity as without it, the", 30,410,infont,0)
Draw.Text("Google images. The jump effect comes from gravity as without it, the", 29,409,infont,22)
Draw.Text("character would just float. The landing comes from collision because without", 30,390,infont,0)
Draw.Text("character would just float. The landing comes from collision because without", 29,389,infont,22)
Draw.Text("something to stop the gravity, the character will just fall into the ground. The", 30,370,infont,0)
Draw.Text("something to stop the gravity, the character will just fall into the ground. The", 29,369,infont,22)
Draw.Text("purple energy balls come from collisions as well. Collision is just something ", 30,350,infont,0)
Draw.Text("purple energy balls come from collisions as well. Collision is just something ", 29,349,infont,22)
Draw.Text("that allows two objects to hit. I can't explain it, but you can find out more at:", 30,330,infont,0)
Draw.Text("that allows two objects to hit. I can't explain it, but you can find out more at:", 29,329,infont,22)
Draw.Text("http://compsci.ca/v3/viewtopic.php?t=13661. The music I found from Youtube.", 30,310,infont,0)
Draw.Text("http://compsci.ca/v3/viewtopic.php?t=13661. The music I found from Youtube.", 29,309,infont,22)
Draw.Text("Just type in \"Super Smash Bros. Wii U All Soundtracks\" and you will find them.", 30,290,infont,0)
Draw.Text("Just type in \"Super Smash Bros. Wii U All Soundtracks\" and you will find them.", 29,289,infont,22)
Draw.Text("Now that everything is cleared up, I'd like to warn you about an error that doesn't", 30,270,infont,0)
Draw.Text("Now that everything is cleared up, I'd like to warn you about an error that doesn't", 29,269,infont,22)
Draw.Text("affect me. Whenever I apply: loop", 30,250,infont,0)
Draw.Text("affect me. Whenever I apply: loop", 29,249,infont,22)
Draw.Text("exit when GUI.ProcessEvent", 320,230,infont,0)
Draw.Text("exit when GUI.ProcessEvent", 319,229,infont,22)
Draw.Text("end loop", 280,210,infont,0)
Draw.Text("end loop ", 279,209,infont,22)
Draw.Text("There's this screen that pops up saying WidgetModule.tu for the buttons. This", 30,190,infont,0)
Draw.Text("There's this screen that pops up saying WidgetModule.tu for the buttons. This", 29,189,infont,22)
Draw.Text("is not an error because of me, but rather Turing itself. Because the software", 30,170,infont,0)
Draw.Text("is not an error because of me, but rather Turing itself. Because the software", 29,169,infont,22)
Draw.Text("of Windows is newer, Turing is not use to that. In order to fix, you need to", 30,150,infont,0)
Draw.Text("of Windows is newer, Turing is not use to that. In order to fix, you need to", 29,149,infont,22)
Draw.Text("install and rearrange certain things on your computer. This maybe fixed in", 30,130,infont,0)
Draw.Text("install and rearrange certain things on your computer. This maybe fixed in", 29,129,infont,22)
Draw.Text("Turing 4.1.2 whenever that releases with the bugs fixed and all. Now I say:", 30,110,infont,0)
Draw.Text("Turing 4.1.2 whenever that releases with the bugs fixed and all. Now I say:", 29,109,infont,22)
infont:=Font.New("Times New Romen:27")
Draw.Text("THANK YOU FOR PLAYING MY GAME!", 33,60,infont,0)
Draw.Text("THANK YOU FOR PLAYING MY GAME!", 32,59,infont,2)
infont:=Font.New("Times New Romen:12")
Draw.Text("PLEASE GO TO CODING WINDOW AND PRESS \"Run\", IF YOU WANT TO PLAY AGAIN!", 40,30,infont,0)
Draw.Text("PLEASE GO TO CODING WINDOW AND PRESS \"Run\", IF YOU WANT TO PLAY AGAIN!", 39,29,infont,22)
end credit

% Control Title
infont:=Font.New("Times New Romen:26")
Draw.Text("YOU HAVE RECLAIMED THE KINGDOM!", 30,520,infont,0)
Draw.Text("YOU HAVE RECLAIMED THE KINGDOM!", 29,519,infont,4)
% Buttons
credit_to_me := GUI.CreateButton (290,470,0, "SEE WHO MADE IT",credit)
% Button Press (The Source Of The Stupid Code That Pops Up Right After
% You Close The Program Because Of The Version Of Windows Being The
% Latest Which I Hope Turing Fixes In 4.1.2)
loop
exit when GUI.ProcessEvent
end loop
end won

% Final Up Stage
if dmlives <= 3 then
cls
final_stage_begins
end if
% Game Over
if mlives <= 0 then
cls
game_over
% Buttons
var see_credit : int := GUI.CreateButton (310,400,0, "Game Over See Credit",credit)
% Button Press (The Source Of The Stupid Code That Pops Up Right After
% You Close The Program Because Of The Version Of Windows Being The
% Latest Which I Hope Turing Fixes In 4.1.2)
loop
exit when GUI.ProcessEvent
end loop
end if
end loop
end game

% Story
infont:=Font.New("Times New Romen:14")
Draw.Text("It was just a nice day till an evil person arrived from another ", 140,440,infont,0)
Draw.Text("It was just a nice day till an evil person arrived from another ", 139,439,infont,180)
Draw.Text("dimension. He claimed his name was Mario and he had ruled", 166,420,infont,0)
Draw.Text("dimension. He claimed his name was Mario and he had ruled", 165,419,infont,180)
Draw.Text("infinite Mushroom Kingdoms and always people fought back", 166,400,infont,0)
Draw.Text("infinite Mushroom Kingdoms and always people fought back", 165,399,infont,180)
Draw.Text("and never won. Even his own dimensional twins were no match.", 161,380,infont,0)
Draw.Text("and never won. Even his own dimensional twins were no match.", 160,379,infont,180)
Draw.Text("He offered to spare this world's people, if they surrenderred", 161,360,infont,0)
Draw.Text("He offered to spare this world's people, if they surrenderred", 160,359,infont,180)
Draw.Text("their kingdom. Of course the king, Toadsworth, said no. Dark", 161,340,infont,0)
Draw.Text("their kingdom. Of course the king, Toadsworth, said no. Dark", 160,339,infont,180)
Draw.Text("Mario, as what people called him, threw everybody out of the", 164,320,infont,0)
Draw.Text("Mario, as what people called him, threw everybody out of the", 163,319,infont,180)
Draw.Text("castle and claimed it for himself, the kingdom. Whoever was", 165,300,infont,0)
Draw.Text("castle and claimed it for himself, the kingdom. Whoever was", 164,299,infont,180)
Draw.Text("left got enslaved by Dark Mario. When Mario returned after his", 171,280,infont,0)
Draw.Text("left got enslaved by Dark Mario. When Mario returned after his", 170,279,infont,180)
Draw.Text("left got enslaved by Dark Mario. When Mario returned after his", 171,280,infont,0)
Draw.Text("left got enslaved by Dark Mario. When Mario returned after his", 170,279,infont,180)
Draw.Text("stroll with the princess, they found the castle transformed.", 179,260,infont,0)
Draw.Text("stroll with the princess, they found the castle transformed.", 178,259,infont,180)
Draw.Text("Everybody was looking sad and miserable. Toadsworth", 188,240,infont,0)
Draw.Text("Everybody was looking sad and miserable. Toadsworth", 187,239,infont,180)
Draw.Text("begged Mario to help reclaim his kingdom. Mario said, \"Yes!\"", 198,220,infont,0)
Draw.Text("begged Mario to help reclaim his kingdom. Mario said, \"Yes!\"", 197,219,infont,180)
Draw.Text("and asked who's responsible for this. Mario was shocked to", 208,200,infont,0)
Draw.Text("and asked who's responsible for this. Mario was shocked to", 207,199,infont,180)
Draw.Text("find it was himself and not his enemy Bowser. Mario jumped", 218,180,infont,0)
Draw.Text("find it was himself and not his enemy Bowser. Mario jumped", 217,179,infont,180)
Draw.Text("into the castle and challenged Dark Mario to a fight. Dark", 229,160,infont,0)
Draw.Text("into the castle and challenged Dark Mario to a fight. Dark", 228,159,infont,180)
Draw.Text("Mario laughed and accepted Mario's challenge. Now the", 240,140,infont,0)
Draw.Text("Mario laughed and accepted Mario's challenge. Now the", 239,139,infont,180)
Draw.Text("battle is on. Do you accept?", 260,120,infont,0)
Draw.Text("battle is on. Do you accept?", 259,119,infont,180)
% Buttons
var game_begin : int := GUI.CreateButton (380,50,0, "Start Game",game)
% Button Press (The Source Of The Stupid Code That Pops Up Right After
% You Close The Program Because Of The Version Of Windows Being The
% Latest Which I Hope Turing Fixes In 4.1.2)
loop
exit when GUI.ProcessEvent
end loop
end mario_quest

% Status
infont:=Font.New("Times New Romen:14")
Draw.Text("Hello Everybody! I'm the developer of this game. My name is Shivang. My class", 30,490,infont,0)
Draw.Text("Hello Everybody! I'm the developer of this game. My name is Shivang. My class", 29,489,infont,22)
Draw.Text("is GVSS_Tajalli _ ICS2O. This program was completed on December 29, 2014.", 30,470,infont,0)
Draw.Text("is GVSS_Tajalli _ ICS2O. This program was completed on December 29, 2014.", 29,469,infont,22)
Draw.Text("You can refer to me as Master-Awesome or Special Cinema. I programmed ", 30,450,infont,0)
Draw.Text("You can refer to me as Master-Awesome or Special Cinema. I programmed ", 29,449,infont,22)
Draw.Text("this game. It wasn't easy. The characters and backgrounds are found from", 30,430,infont,0)
Draw.Text("this game. It wasn't easy. The characters and backgrounds are found from", 29,429,infont,22)
Draw.Text("Google images. The jump effect comes from gravity as without it, the", 30,410,infont,0)
Draw.Text("Google images. The jump effect comes from gravity as without it, the", 29,409,infont,22)
Draw.Text("character would just float. The landing comes from collision because without", 30,390,infont,0)
Draw.Text("character would just float. The landing comes from collision because without", 29,389,infont,22)
Draw.Text("something to stop the gravity, the character will just fall into the ground. The", 30,370,infont,0)
Draw.Text("something to stop the gravity, the character will just fall into the ground. The", 29,369,infont,22)
Draw.Text("purple energy balls come from collisions as well. Collision is just something ", 30,350,infont,0)
Draw.Text("purple energy balls come from collisions as well. Collision is just something ", 29,349,infont,22)
Draw.Text("that allows two objects to hit. I can't explain it, but you can find out more at:", 30,330,infont,0)
Draw.Text("that allows two objects to hit. I can't explain it, but you can find out more at:", 29,329,infont,22)
Draw.Text("http://compsci.ca/v3/viewtopic.php?t=13661. The music I found from Youtube.", 30,310,infont,0)
Draw.Text("http://compsci.ca/v3/viewtopic.php?t=13661. The music I found from Youtube.", 29,309,infont,22)
Draw.Text("Just type in \"Super Smash Bros. Wii U All Soundtracks\" and you will find them.", 30,290,infont,0)
Draw.Text("Just type in \"Super Smash Bros. Wii U All Soundtracks\" and you will find them.", 29,289,infont,22)
Draw.Text("Now that everything is cleared up, I'd like to warn you about an error that doesn't", 30,270,infont,0)
Draw.Text("Now that everything is cleared up, I'd like to warn you about an error that doesn't", 29,269,infont,22)
Draw.Text("affect me. Whenever I apply: loop", 30,250,infont,0)
Draw.Text("affect me. Whenever I apply: loop", 29,249,infont,22)
Draw.Text("exit when GUI.ProcessEvent", 320,230,infont,0)
Draw.Text("exit when GUI.ProcessEvent", 319,229,infont,22)
Draw.Text("end loop", 280,210,infont,0)
Draw.Text("end loop ", 279,209,infont,22)
Draw.Text("There's this screen that pops up saying WidgetModule.tu for the buttons. This", 30,190,infont,0)
Draw.Text("There's this screen that pops up saying WidgetModule.tu for the buttons. This", 29,189,infont,22)
Draw.Text("is not an error because of me, but rather Turing itself. Because the software", 30,170,infont,0)
Draw.Text("is not an error because of me, but rather Turing itself. Because the software", 29,169,infont,22)
Draw.Text("of Windows is newer, Turing is not use to that. In order to fix, you need to", 30,150,infont,0)
Draw.Text("of Windows is newer, Turing is not use to that. In order to fix, you need to", 29,149,infont,22)
Draw.Text("install and rearrange certain things on your computer. This maybe fixed in", 30,130,infont,0)
Draw.Text("install and rearrange certain things on your computer. This maybe fixed in", 29,129,infont,22)
Draw.Text("Turing 4.1.2 whenever that releases with the bugs fixed and all. Now I say:", 30,110,infont,0)
Draw.Text("Turing 4.1.2 whenever that releases with the bugs fixed and all. Now I say:", 29,109,infont,22)
infont:=Font.New("Times New Romen:27")
Draw.Text("THANK YOU FOR PLAYING MY GAME!", 33,60,infont,0)
Draw.Text("THANK YOU FOR PLAYING MY GAME!", 32,59,infont,2)
infont:=Font.New("Times New Romen:12")
Draw.Text("PLEASE GO TO CODING WINDOW AND PRESS \"Run\", IF YOU WANT TO PLAY AGAIN!", 40,30,infont,0)
Draw.Text("PLEASE GO TO CODING WINDOW AND PRESS \"Run\", IF YOU WANT TO PLAY AGAIN!", 39,29,infont,22)
end credit

% Control Title
infont:=Font.New("Times New Romen:26")
Draw.Text("YOU HAVE RECLAIMED THE KINGDOM!", 30,520,infont,0)
Draw.Text("YOU HAVE RECLAIMED THE KINGDOM!", 29,519,infont,4)
% Buttons
credit_to_me := GUI.CreateButton (290,470,0, "SEE WHO MADE IT",credit)
% Button Press (The Source Of The Stupid Code That Pops Up Right After
% You Close The Program Because Of The Version Of Windows Being The
% Latest Which I Hope Turing Fixes In 4.1.2)
loop
exit when GUI.ProcessEvent
end loop
end won

% Final Up Stage
if dmlives <= 3 then
cls
final_stage_begins
end if
% Game Over
if mlives <= 0 then
cls
game_over
% Buttons
var see_credit : int := GUI.CreateButton (310,400,0, "Game Over See Credit",credit)
% Button Press (The Source Of The Stupid Code That Pops Up Right After
% You Close The Program Because Of The Version Of Windows Being The
% Latest Which I Hope Turing Fixes In 4.1.2)
loop
exit when GUI.ProcessEvent
end loop
end if
end loop
end game

% Story
infont:=Font.New("Times New Romen:14")
Draw.Text("It was just a nice day till an evil person arrived from another ", 140,440,infont,0)
Draw.Text("It was just a nice day till an evil person arrived from another ", 139,439,infont,180)
Draw.Text("dimension. He claimed his name was Mario and he had ruled", 166,420,infont,0)
Draw.Text("dimension. He claimed his name was Mario and he had ruled", 165,419,infont,180)
Draw.Text("infinite Mushroom Kingdoms and always people fought back", 166,400,infont,0)
Draw.Text("infinite Mushroom Kingdoms and always people fought back", 165,399,infont,180)
Draw.Text("and never won. Even his own dimensional twins were no match.", 161,380,infont,0)
Draw.Text("and never won. Even his own dimensional twins were no match.", 160,379,infont,180)
Draw.Text("He offered to spare this world's people, if they surrenderred", 161,360,infont,0)
Draw.Text("He offered to spare this world's people, if they surrenderred", 160,359,infont,180)
Draw.Text("their kingdom. Of course the king, Toadsworth, said no. Dark", 161,340,infont,0)
Draw.Text("their kingdom. Of course the king, Toadsworth, said no. Dark", 160,339,infont,180)
Draw.Text("Mario, as what people called him, threw everybody out of the", 164,320,infont,0)
Draw.Text("Mario, as what people called him, threw everybody out of the", 163,319,infont,180)
Draw.Text("castle and claimed it for himself, the kingdom. Whoever was", 165,300,infont,0)
Draw.Text("castle and claimed it for himself, the kingdom. Whoever was", 164,299,infont,180)
Draw.Text("left got enslaved by Dark Mario. When Mario returned after his", 171,280,infont,0)
Draw.Text("left got enslaved by Dark Mario. When Mario returned after his", 170,279,infont,180)
Draw.Text("left got enslaved by Dark Mario. When Mario returned after his", 171,280,infont,0)
Draw.Text("left got enslaved by Dark Mario. When Mario returned after his", 170,279,infont,180)
Draw.Text("stroll with the princess, they found the castle transformed.", 179,260,infont,0)
Draw.Text("stroll with the princess, they found the castle transformed.", 178,259,infont,180)
Draw.Text("Everybody was looking sad and miserable. Toadsworth", 188,240,infont,0)
Draw.Text("Everybody was looking sad and miserable. Toadsworth", 187,239,infont,180)
Draw.Text("begged Mario to help reclaim his kingdom. Mario said, \"Yes!\"", 198,220,infont,0)
Draw.Text("begged Mario to help reclaim his kingdom. Mario said, \"Yes!\"", 197,219,infont,180)
Draw.Text("and asked who's responsible for this. Mario was shocked to", 208,200,infont,0)
Draw.Text("and asked who's responsible for this. Mario was shocked to", 207,199,infont,180)
Draw.Text("find it was himself and not his enemy Bowser. Mario jumped", 218,180,infont,0)
Draw.Text("find it was himself and not his enemy Bowser. Mario jumped", 217,179,infont,180)
Draw.Text("into the castle and challenged Dark Mario to a fight. Dark", 229,160,infont,0)
Draw.Text("into the castle and challenged Dark Mario to a fight. Dark", 228,159,infont,180)
Draw.Text("Mario laughed and accepted Mario's challenge. Now the", 240,140,infont,0)
Draw.Text("Mario laughed and accepted Mario's challenge. Now the", 239,139,infont,180)
Draw.Text("battle is on. Do you accept?", 260,120,infont,0)
Draw.Text("battle is on. Do you accept?", 259,119,infont,180)
% Buttons
var game_begin : int := GUI.CreateButton (380,50,0, "Start Game",game)
% Button Press (The Source Of The Stupid Code That Pops Up Right After
% You Close The Program Because Of The Version Of Windows Being The
% Latest Which I Hope Turing Fixes In 4.1.2)
loop
exit when GUI.ProcessEvent
end loop
end mario_quest

Posted: Tue Jan 06, 2015 2:29 am Post subject: RE:I Need Help With Gui Buttons! Whenever I Apply, There Is This Glitch Where In Next Procedure Buttons Are Still There!

So you never exit any of those loops -- just throw more code on top. It follows that all of your buttons are still there. GUI.ProcessEvent checks if any of the active buttons have received an event, and processes them.

Posted: Tue Jan 06, 2015 12:37 pm Post subject: Re: I Need Help With Gui Buttons! Whenever I Apply, There Is This Glitch Where In Next Procedure Buttons Are Still There

I tried your thing out, but when I reach procedure final_stage_begins , it starts to get stuck in a loop. I'm still checking the code over, but I'm not sure if this is actually going to work out because when I took out the process event, in the next procedure, the buttons still continued to be there even when you can't see them.

Tony

Posted: Tue Jan 06, 2015 1:42 pm Post subject: RE:I Need Help With Gui Buttons! Whenever I Apply, There Is This Glitch Where In Next Procedure Buttons Are Still There!

Posted: Tue Jan 06, 2015 6:16 pm Post subject: Re: I Need Help With Gui Buttons! Whenever I Apply, There Is This Glitch Where In Next Procedure Buttons Are Still There

Okay so the GUI.Dispose thing doesn't work for me because I applied it several times before writing this post and now I actually had a closer examination by copying and pasting the example and realized that GUI.Dispose only works when GUI.Quit is applied and that kind of freezes my program when I try that. As of GUI.Hide and GUI.Show. I'm not actually sure of that one.

It would help if I was shown an example of this one otherwise, this may be something the inventors of Turing might need to look into.

Tony

Posted: Tue Jan 06, 2015 8:40 pm Post subject: Re: I Need Help With Gui Buttons! Whenever I Apply, There Is This Glitch Where In Next Procedure Buttons Are Still There

master-awesome @ Tue Jan 06, 2015 6:16 pm wrote:

[size=18]realized that GUI.Dispose only works when GUI.Quit is applied