Page 1 of 1

Centering an icon with a transparent bg on a checkbox

Posted: Wed Apr 20, 2016 4:03 am
by JasonC
When I create a checkbox with an icon in it, and the icon has a transparent background (the game's battery icon is a good example), the game automatically crops the image to the non-transparent area before drawing it on the checkbox.

How can I center it on the button?
  • align="center" has no effect
  • I can't use "shift" unless I know exactly what the contents of the image are at design time, which in this case I don't.
  • What I *do* know is the size of the image itself including the background (e.g. 32x32), so I can certainly use shift, etc., to center that 32x32 box, if it didn't crop the image.
Alternately, how can I disable the auto cropping (which incidentally also messes with image scaling on buttons)?