• Create Account

### #Actualprh99

Posted 30 July 2012 - 03:10 AM

The mouse is in box MouseX() / 40 and MouseY() / 40 you'll have to add in the offset if your grid's start is something other than 0,0. You can can get the screen coordinates of the upper left hand corner of square the mouse is by multiplying the result of the previous operation by 40 the adding in any offset for where your grid begins. Hope that helps and I haven't completely misunderstood(4am here lol)

You could also keep track of the box information in an array, storing the x,y of the upper left corner and check the mouse position against the array when needed, say a click.

### #3prh99

Posted 30 July 2012 - 03:07 AM

The mouse is in box MouseX() / 40 and MouseY() / 40 you'll have to add in the offset if your grid's start is something other than 0,0. You can can get the screen coordinates of the upper left hand corner of square the mouse is by multiplying the result of the previous operation by 40 the adding in any offset for where your grid begins. Hope that helps and I haven't completely misunderstood(4am here lol)

You could also keep track of the box information in an array, storing the x,y of the upper left corner and check the mouse position against the array when needed, say a click. Probably not so great doing something like a mouse over action.

### #2prh99

Posted 30 July 2012 - 03:00 AM

The mouse is in box MouseX() / 40 and MouseY() / 40 you'll have to add in the offset if your grid's start is something other than 0,0. You can can get the screen coordinates of the upper left hand corner of square the mouse is by multiplying the result of the previous operation by 40 the adding in any offset for where your grid begins. Hope that helps and I haven't completely misunderstood(4am here lol)

### #1prh99

Posted 30 July 2012 - 02:53 AM

The mouse is in box MouseX() / 40 and MouseY() / 40 you'll have to add in the offset if your grid's start is something other than 0,0

PARTNERS