import GUI
var winID : int
winID := Window.Open ("position:0;0,graphics:800;600")
setscreen ("graphics:800:600")
var pic : int := Pic.FileNew ("back1.jpg")
Pic.Draw (pic, 0, 0, picMerge)
var font1, font2, font3 : int
font1 := Font.New ("Comicsans:20:bold,italic")
Font.Draw ("Welcome To", 300, 520, font1, white)
font3 := Font.New ("Arial:12:italic")
Font.Draw ("Please select your choice", 250, 380, font3, black)
font2 := Font.New ("Arial:18:bold")
Font.Draw ("E", 240, 500, font2, black)
delay (100)
Font.Draw ("N", 262, 495, font2, 20)
delay (100) %22
Font.Draw ("T", 284, 490, font2, 21)
delay (100)
Font.Draw ("E", 306, 485, font2, 22)
delay (100)
Font.Draw ("R", 328, 480, font2, 23)
delay (100)
Font.Draw ("T", 350, 475, font2, 24)
delay (100)
Font.Draw ("A", 372, 470, font2, 25)
delay (100)
Font.Draw ("I", 394, 465, font2, 26)
delay (100)
Font.Draw ("N", 410, 460, font2, 27)
delay (100)
Font.Draw ("M", 432, 455, font2, 28)
delay (100)
Font.Draw ("E", 460, 450, font2, 29)
delay (100)
Font.Draw ("N", 482, 445, font2, 30)
delay (100)
Font.Draw ("T", 504, 440, font2, 31)
delay (100)
Font.Draw ("T", 394, 430, font2, 20)
delay (100)
Font.Draw ("R", 416, 425, font2, 23)
delay (100)
Font.Draw ("I", 438, 420, font2, 26)
delay (100)
Font.Draw ("V", 450, 415, font2, 29)
delay (100)
Font.Draw ("I", 472, 410, font2, 30)
delay (100)
Font.Draw ("A", 490, 405, font2, 31)
procedure a
cls
var pic : int := Pic.FileNew ("movieback.jpg")
Pic.Draw (pic, 0, 0, picMerge)
Font.Draw ("Movie Trivia", 50, 500, font1, white)
delay (4000)
cls
%questions
end a
procedure b
%exit the program
cls
colourback (black)
cls
for counter : 1 .. 1
locate (20, 30)
var word1 : string := "Thank you for using the program" %from compsci
var cola1 : int := 35
for row1 : 1 .. 25
for counter1 : 1 .. 20
put " " ..
end for
end for
color (white)
for a1 : 1 .. length (word1)
locate (17, cola1)
cola1 += 1
put word1 (a1)
delay (100)
end for
end for
delay (1000)
Window.Close (winID)
end b
procedure c
cls
var pic : int := Pic.FileNew ("musicback.jpg")
Pic.Draw (pic, 0, 0, picMerge)
Font.Draw ("M", 60, 305, font1, black)
Font.Draw ("u", 70, 285, font1, black)
Font.Draw ("s", 80, 265, font1, black)
Font.Draw ("i", 90, 245, font1, black)
Font.Draw ("c", 100, 225, font1, black)
Font.Draw ("T", 110, 200, font1, black)
Font.Draw ("r", 120, 180, font1, black)
Font.Draw ("i", 130, 160, font1, black)
Font.Draw ("v", 140, 140, font1, black)
Font.Draw ("i", 150, 120, font1, black)
Font.Draw ("a", 160, 100, font1, black)
delay (4000)
cls
%questions
end c
procedure d
var pic : int := Pic.FileNew ("tvback.jpg")
Pic.Draw (pic, 0, 0, picMerge)
Font.Draw ("Television/Who says this?", 200, 305, font1, white)
delay (4000)
cls
%quesitons
end d
var button1 : int := GUI.CreateButton (250, 300, 300, "Movie", a)
var button2 : int := GUI.CreateButton (250, 200, 300, "Exit", b)
var button3 : int := GUI.CreateButton (250, 260, 300, "Music", c)
var button4 : int := GUI.CreateButton (250, 340, 300, "Television/Who says this?", d)
loop
exit when GUI.ProcessEvent
end loop
|