We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello . I have an image and want to check if the user clicked it, and print a value. How would I do this? Thanks for any help!
...so the pointRect() function from Thompson in @GoToLoop's answer checks if the mouse is inside the image.
Call pointRect() from mouseClicked(), so that you only check for collision while the mouse is pressed. That is click detection.
If the click is detected, set a variable.