Computer Science Canada Mousewhere |
Author: | harishmabish [ Sat Mar 29, 2008 7:36 pm ] |
Post subject: | Mousewhere |
Can i have some clear instruction on how to use mousewhere? I'm making a game, and I want a start button, I've tried using the mousewhere, but my coordinates are just not working. I'm probably doing the whole thing wrong. Can someone give clear instructions? |
Author: | Sean [ Sat Mar 29, 2008 8:11 pm ] | ||||
Post subject: | Re: Mousewhere | ||||
To use Mouse.Where you need it to be in a loop..
You have drawn a button, using Draw.Box, you want to check to see if the mouse is between the boundaries of the box, and if the person clicked the button.
If you are using a procedure, you would replaces the put "Hello" with the procedure name. |
Author: | Tony [ Sat Mar 29, 2008 8:12 pm ] | ||
Post subject: | RE:Mousewhere | ||
Mouse.Where assigns the values of the mouse (x, y, and button state), at the time the call is made, to the variables supplied.
|
Author: | andrew. [ Sat Apr 05, 2008 9:17 pm ] | ||
Post subject: | Re: Mousewhere | ||
If you are using Mouse.Where for just a button, why not use GUI.CreateButton? It's less messy and easier to use. This is only for GUI stuff though (like buttons, text boxes, stuff like that). If you want to use Mouse.Where for your actual game, use it like this.
This is basically how to use it. Not very hard, but making buttons can be messy with it. |