Computer Science Canada

mouse-click on image

Author:  noobprogrammer123 [ Mon May 03, 2004 6:46 pm ]
Post subject:  mouse-click on image

how do i get it to tell when the mouse clicks on an image

Author:  Mazer [ Mon May 03, 2004 6:49 pm ]
Post subject: 

Where is the image? How big is the image?

Bottom left of image will be (x, y), with a width of w and a height of h.

code:

var mx, my, btn : int

loop
    mousewhere (mx, my, btn)
    Pic.Draw (pic, x, y, 0)

    if btn = 1 and mx >= x and mx <= x + w and my >= y and my <= my + h then
    end if
end loop


: