PDA

View Full Version : Checking if the mouse is over a 'rounded buttom'



Anonymous Coward
05-09-2001, 01:14 PM
If I have an image that represents a buttom. The buttom is a quad with the texture of the buttom with blending
enabled, so the alpha channel of the image is transparent. If I want to know if the mouse is over this buttom the easy
way will be checking the mouse coords and see if they are inside the quad, but if it has transparent edges and how should I
do the test? Thank you!

Korval
05-09-2001, 09:11 PM
Once you've determined that the point is inside the quad, just convert this point into a pixel of your bitmap. If that pixel in your bitmap is transparent, then it is not over the important part of the button.