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

Username:   Password: 
 RegisterRegister   
 Is there a mouse click equivalent to Input.Pause
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
KONjbnj




PostPosted: Wed Jun 07, 2006 10:04 pm   Post subject: Is there a mouse click equivalent to Input.Pause

Like I want the program to pause until the user clicks on one of either two buttons on the screen.
Sponsor
Sponsor
Sponsor
sponsor
NikG




PostPosted: Wed Jun 07, 2006 10:16 pm   Post subject: (No subject)

all you need is a loop that exits once one of the buttons is pressed.
Clayton




PostPosted: Wed Jun 07, 2006 10:59 pm   Post subject: (No subject)

Mouse.ButtonWait or Mouse.ButtonMoved might be of some interest to you, look it up in the F10 menu in Turing (as we dont have a tut on them Sad )
NikG




PostPosted: Wed Jun 07, 2006 11:17 pm   Post subject: (No subject)

SuperFreak82 wrote:
Mouse.ButtonWait or Mouse.ButtonMoved might be of some interest to you, look it up in the F10 menu in Turing (as we dont have a tut on them Sad )

I'm not sure whether those two commands are sufficient on their own. KONjbnj wants to pause the program until one of two buttons is pressed, whereas those two commands act as a pause but only there is a mouse event, in which case they would resume the program.

Using those two commands inside a loop works pretty well though.
Clayton




PostPosted: Thu Jun 08, 2006 7:42 am   Post subject: (No subject)

Actually Mouse.ButtonWait pauses the program for a mouse event to happen, which is pretty much the equivalent to Input.Pause so read up on it Very Happy
NikG




PostPosted: Fri Jun 09, 2006 2:05 am   Post subject: (No subject)

Actually, I think you should read up on the problem at hand.

Yes, Mouse.ButtonWait waits until a mouse even, but then it moves on.

KONjbnj needs it so that the user clicks in a specific location before they can move on. Without a loop, Mouse.ButtonWait would resume the program even if the user clicked anywhere else.
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  [ 6 Posts ]
Jump to:   


Style:  
Search: