Detecting clicks on images II
- Your image is drawn starting from some (X, Y) coordinates
- These are the top left corner of the image
- The mouse X and Y are within the image if:
imageX <= mouseX <= (imageX + imageWidth)
imageY <= mouseY <= (imageY + imageHeight)
- You probably want to arrange your code so that if you click
over two images simultaneously, only one is chosen