Computer Science Canada Is there a mouse click equivalent to Input.Pause |
Author: | KONjbnj [ 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. |
Author: | NikG [ Wed Jun 07, 2006 10:16 pm ] |
Post subject: | |
all you need is a loop that exits once one of the buttons is pressed. |
Author: | Clayton [ Wed Jun 07, 2006 10:59 pm ] |
Post 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 ![]() |
Author: | NikG [ Wed Jun 07, 2006 11:17 pm ] |
Post 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
![]() 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. |
Author: | Clayton [ Thu Jun 08, 2006 7:42 am ] |
Post 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 ![]() |
Author: | NikG [ Fri Jun 09, 2006 2:05 am ] |
Post 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. |