My Final Project
Author |
Message |
neondayz
|
Posted: Fri Jan 07, 2011 12:30 pm Post subject: My Final Project |
|
|
Im trying to make quiz for my final project
import GUI
var picID : int
%Music
process playMusic
loop
Music.PlayFile ("moonplace.mp3")
end loop
end playMusic
fork playMusic
% background1
%store picture in memory
picID := Pic.FileNew ("Intro Background.bmp")
proc easyy
end easyy
proc hard
end hard
%display picture
Pic.Draw (picID, 0, 0, picMerge)
% declare variables
var winID, font : int
var startt, cred, instruc, exitt, easy, hardd, finished : int
% display window title
View.Set ("title:Name That Car Quiz")
% start
proc start
cls
GUI.Dispose (startt)
GUI.Dispose (cred)
GUI.Dispose (instruc)
GUI.Dispose (exitt)
%store picture in memory
picID := Pic.FileNew ("a.jpg")
%display picture
Pic.Draw (picID, 0, 0, picMerge)
easy := GUI.CreateButtonFull (168, 222, 100, "SLOW", easyy, 0, '^X', false)
hardd := GUI.CreateButtonFull (395, 222, 100, "FAST", hard, 0, '^X', false)
%store picture in memory
picID := Pic.FileNew ("hey.bmp")
%display picture
Pic.Draw (picID, 223, 30, picMerge)
end start
% credits
proc credits
winID := Window.Open ("position:top;center,graphics:400;200")
View.Set ("title:Credits")
%store picture in memory
picID := Pic.FileNew ("credits.bmp")
%display picture
Pic.Draw (picID, 0, 0, picMerge)
end credits
% instructions
proc instructions
winID := Window.Open ("position:top;center,graphics:400;200")
View.Set ("title:Instructions")
%store picture in memory
picID := Pic.FileNew ("instructions.bmp")
%display picture
Pic.Draw (picID, 0, 0, picMerge)
end instructions
% quit
procedure finish
quit
end finish
startt := GUI.CreateButtonFull (450, 110, 100, "Start", start, 0, '^X', false)
cred := GUI.CreateButtonFull (450, 90, 100, "Credits", credits, 0, '^X', false)
instruc := GUI.CreateButtonFull (450, 70, 100, "Instructions", instructions, 0, '^X', false)
exitt := GUI.CreateButtonFull (450, 50, 100, "Exit", finish, 0, '^X', false)
loop
exit when GUI.ProcessEvent
end loop
On my difficulty screen i have 2 buttons "fast" and "slow" im not sure how to make it so when
you presss it you go to the first question
I tryed using a gui dispose but that didnt work i also tryed adding cls but it always
clears my difficulty screen
im using version 4.1 ![Sad Sad](http://compsci.ca/v3/images/smiles/icon_sad.gif) |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Fri Jan 07, 2011 2:20 pm Post subject: RE:My Final Project |
|
|
When you press a button, the code flow moves to the associated procedure, in this case
code: |
proc easyy
end easyy
|
Perhaps you should do something there. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
neondayz
|
Posted: Mon Jan 10, 2011 1:27 pm Post subject: RE:My Final Project |
|
|
thank you =) |
|
|
|
|
![](images/spacer.gif) |
JamilYoussef24
|
Posted: Fri Jan 14, 2011 10:35 am Post subject: RE:My Final Project |
|
|
smart coding
keep up the good work chap |
|
|
|
|
![](images/spacer.gif) |
|
|