Hi everyone,
I have a problem about non-rectangle button with a png image like in the attachment.
In my design there is a big circle and this circle divided into buttons. Those buttons have leaned text on them.(White leaned paint like in the attachment) In the middle of circle there is another circle sound button.
My problem is, those small buttons activating even i am pressing on transparent sides and blocking the main click on the middle sound button or other buttons.
Any ideas how to solve it? Can i define custom click points using button class somehow?
any help will be appreciated
Talis
Comments
https://github.com/gideros/gideros
https://www.youtube.com/c/JohnBlackburn1975
http://www.giderosmobile.com/forum/discussion/218/how-to-get-spritehittestpoint-to-ignore-transparent-areas-of-image
For a ring you test
r1^2 < (x-x0)^2+(y-y0)^2 < r2^2
where r1 is the inner and r2 the outer radius.
For the button at the top left of the picture with the speaker in the middle:
r1^2 < (x-x0)^2+(y-y0)^2 < r2^2
AND xy1
where x=x1 is the vertical line terminating the dark green button and y=y1 the horizontal line.
https://github.com/gideros/gideros
https://www.youtube.com/c/JohnBlackburn1975