I have two buttons (custom png images, kind of rectangle shaped but with very rounded corners) extending from actor in a screen, and they act whenever you click on them. The problem is, my buttons have rounded corners. And since the setBounds() method only lets me set rectangular bounds for them, they are pretty inaccurate.
So, is there any way to make the bounds of the actor coincide with my png image’s bounds, or at least make them more accurate? Or am i going in the wrong direction here?
PS: I already know about the
hit() method and how you can override it to "modify" the bounds of an object, but i don’t have a Circle to get an area from and apparently my math skills aren’t enough to find some formula that somehow gets the perimeter of a circle given a certain x or y point.