
-----------------------------------
gameover
Wed Dec 06, 2006 7:41 pm

Mouse help
-----------------------------------
well i have a trivia game and i am trying to use the mouse instead of typing in the answer and i need advice on how to do so :?

-----------------------------------
gameover
Wed Dec 06, 2006 7:51 pm


-----------------------------------
someone help plz :(

-----------------------------------
uberwalla
Wed Dec 06, 2006 7:59 pm


-----------------------------------
You could use either the GUI buttons with the choices in the game, or u could create your own using the mouse.where command.
There is a tutorial of mouse here:
http://www.compsci.ca/v2/viewtopic.php?t=3275

if u use the mouse.where then just make if statements to create an invisible box around writing so that when it goes over and clicks the area of text it prompts the next question or false answer, etc.

-----------------------------------
gameover
Wed Dec 06, 2006 7:59 pm


-----------------------------------
So what would i do with this part of the program? just add the mouse part in the end? and btw i just learned to do the mouse thing :( 

% Question 2 
Font.Draw ("#2", 10, 350, font1, red) 
Font.Draw ("What fruit has 50% the same genetic information as humans?", 50, 300, font2, red) 
Font.Draw ("*cough* monkeys *cough*", 50, 280, font2, red) 
Font.Draw ("a) Apple", 70, 260, font3, red) 
Font.Draw ("b) Banana", 70, 240, font3, red) 
Font.Draw ("c) Kiwi", 70, 220, font3, red) 
Font.Draw ("d) Peach", 70, 200, font3, red) 
locate (15, 10) 
get q2 

if q2 = "b" 
then 
Font.Draw ("Wow, you got it right!", 70, 140, font3, red) 
wrong := wrong + 1 
score := score + 1 
else 
Font.Draw ("Sorry, you got it wrong. The correct answer is b) Banana.", 70, 140, font3, red) 
right := right + 1 
score := score - 1 
end if 

locate (20, 30) 
colorback (2) 
put "Press Any Key To Continue" 
locate (21, 40) 
getch (any) 
cls
