
-----------------------------------
harishmabish
Sat Mar 29, 2008 7:36 pm

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?

-----------------------------------
Sean
Sat Mar 29, 2008 8:11 pm

Re: Mousewhere
-----------------------------------
To use Mouse.Where you need it to be in a loop..


var mx, my, mb : int

loop
Mouse.Where (mx , my , mb) %This portion initlizes the Mouse.Where and keeps tracking every time, since it is within the loop.
end 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.


var mx, my, mb : int

Draw.Box (100, 100, 200, 200, black) %This is going to be your button

loop
    Mouse.Where (mx, my, mb)
    if mx >= 100 and mx = 100 and my 