%Set screen up
import GUI
setscreen ("nocursor")
setscreen ("noecho")
%Declaration Section
%Global Variables
var quitBtn, menuBtn, playBtn, continueBtn, testBtn : int := 0
var pictureID : int
var rangex, rangey, button : int
var winID1 := Window.Open ("postion:200;200,graphics:640;400")
var location : string
var mistakes : int := 0
%var teachWin := Window.Open ("graphics:640;400")
%Procedures
proc title
cls
locate (1, 32)
put "Testing"
end title
proc goodBye
title
locate (3, 1)
put "Thanks for playing!"
locate (24, 1)
put "Brought to you by -------"
delay (2000)
Window.Close (winID1)
end goodBye
proc teachSection
title
GUI.Show (menuBtn)
locatexy (155, 35)
drawfilloval (170, 155, 25, 25, 12)
mousewhere (rangex, rangey, button)
locate (3, 1)
put "Hover on the red circle."
if button = 1 then
if rangex >= 145 and rangex <= 195 and rangey >= 130 and rangey <= 180 then
colourback (0)
locate (20, 50)
put "Circle"
else
colourback (0)
locatexy (155, 35)
put "That is not one of the locations!"
end if
end if
View.Update
end teachSection
proc introduction
title
locate (3, 1)
put "(put intro here)"
GUI.Show (menuBtn)
loop
exit when GUI.ProcessEvent
end loop
end introduction
proc mainMenu
title
GUI.Show (playBtn)
GUI.Show (quitBtn)
loop
exit when GUI.ProcessEvent
end loop
end mainMenu
playBtn := GUI.CreateButtonFull (222, 250, 200, "Play", teachSection, 25, '^F', false)
quitBtn := GUI.CreateButtonFull (222, 190, 200, "Quit", GUI.Quit, 25, KEY_ESC, false)
menuBtn := GUI.CreateButton (545, 0, 0, "Main Menu", mainMenu)
%Main Program
introduction
loop
exit when GUI.ProcessEvent
end loop
goodBye
|