In my app there is a background image of 480x800. Then I have a play button which when i place on the center of the screen it is positioned correctly. The size of the play button is also 480x800 although the button itself is small and the area around it is transparent.
How can I detect if the user has click on the play button itself and not the background?
Example using a code would be highly appreciated.
You could check where the touch is, and return false on ccTouchBegan if it isn’t in the right coordinates.
But I wouldn’t recommend that, is there a specific reason why the button has to be bigger than what the clickable area is going to be?
In other words, why not crop the button?