Computer Science Canada need help editing. |
Author: | xiaojiji [ Mon May 14, 2007 9:38 am ] |
Post subject: | need help editing. |
% The "GUI.ResetQuit" program. import GUI var radio : array 1 .. 4 of int % The radio button IDs. var button : int % Action procedures for the radio buttons procedure apple end apple procedure strawberry end strawberry procedure grape end grape procedure watermelon end watermelon % % Main program % % Create the radio buttons radio (1) := GUI.CreateRadioButton (15, maxy - 35, "Apple", 0, apple) radio (2) := GUI.CreateRadioButton (-1, -1, "Strawberry", radio (1), strawberry) radio (3) := GUI.CreateRadioButton (-1, -1, "Grape", radio (2), grape) radio (4) := GUI.CreateRadioButton (-1, -1, "Water Melon", radio (3), watermelon) % Create the push button button := GUI.CreateButton (100, maxy - 70, 0, "Draw Fruit", GUI.Quit) % Process events until the "Draw Stars" button is pressed loop exit when GUI.ProcessEvent end loop % Dispose of all the radio buttons and the push button for i : 1 .. 2 GUI.Dispose (radio (i)) end for GUI.Dispose (button) for i : 1 .. 2 label 1 : Draw.FillArc (100, 100, 40, 55, 25, 275, 12) Draw.FillArc (170, 100, 40, 55, -95, 160, 12) Draw.Arc (140, 40, 60, 5, 45, 130, 12) Draw.FillArc (109, 120, 50, 5, 290, 10, 12) Draw.Arc (147, 140, 15, 30, 105, -125, 1) Draw.Fill (120, 60, 12, 12) label 2 : Draw.Box (0, 0, 100, 100, 5) Draw.Line (0, 100, 50, 150, 5) Draw.Line (50, 150, 100, 100, 5) Draw.FillBox (0, 0, 100, 100, 5) Draw.Fill (49, 130, 8, 5) Draw.Box (150, 0, 250, 100, 4) Draw.Line (150, 100, 200, 150, 9) Draw.Line (200, 150, 250, 100, 9) Draw.FillBox (150, 0, 250, 100, 10) Draw.Fill (230, 130, 8, 9) % In case we drew over the buttons, redraw them. GUI.Refresh end for % Create a new button button := GUI.CreateButton (300, 10, 0, "Quit", GUI.Quit) % Reset the quit flag. Without this statement, the loop following would % exit immediately because the quit flag was set in the previous loop GUI.ResetQuit % Process events until the "Quit" button is pressed loop exit when GUI.ProcessEvent end loop % Close the window GUI.CloseWindow (defWinID) ![]() |
Author: | xiaojiji [ Mon May 14, 2007 9:39 am ] |
Post subject: | RE:need help editing. |
this code sucks |
Author: | Clayton [ Mon May 14, 2007 10:23 am ] |
Post subject: | RE:need help editing. |
Um.... okay. What exactly do you need help with? Just copying and pasting your code into a post doesn't help us. Instead, give us a description of your problem, and what you've tried to solve it. |
Author: | Carey [ Tue May 15, 2007 8:45 am ] |
Post subject: | Re: need help editing. |
I dont get it. what is it supposed to do? |
Author: | xiaojiji [ Wed May 16, 2007 7:48 am ] |
Post subject: | Re: need help editing. |
i want to make a program to teach spanish, when the usr clicks apple an apple(s) wil appear and will ask what its called in spanish and depending on the answer it will give a different message. if the user clicks another fruit it will appear on another page the fruit picture and so on. |
Author: | Clayton [ Wed May 16, 2007 9:34 am ] |
Post subject: | RE:need help editing. |
So you don't know how? You need to be more specific with your question. |