Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Mouse help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
gameover




PostPosted: Wed Dec 06, 2006 7:41 pm   Post subject: 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 Confused
Sponsor
Sponsor
Sponsor
sponsor
gameover




PostPosted: Wed Dec 06, 2006 7:51 pm   Post subject: (No subject)

someone help plz Sad
uberwalla




PostPosted: Wed Dec 06, 2006 7:59 pm   Post subject: (No subject)

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




PostPosted: Wed Dec 06, 2006 7:59 pm   Post subject: (No subject)

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 Sad

% 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
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: