Label bug when using different scales

Dom818

  • *
  • Posts: 1296
This has been haunting me ever since I first started using labels. I was told that you should attach a label to a very small actor, so I did (a 1x1 transparent pixel). I spawn these, position them, and set the text, and everything seems fine in 1x mode. As soon as I export or begin testing in any mode higher than 1x, the label gets offset ever so slightly. So I finally ran more tests with this today and came to an interesting conclusion, the labels shift when the scale changes.

On 1x, they are perfect.
On 2x, they go up the height of the actor they are attached to.
On 4x, they go up twice the height of the actor.

I made an attempt to fix it but I am at a loss of how the label class operates so I ended up giving up. Screenshots of the bug are attached.

harryzun

  • *
  • Posts: 24
I actually just wrote an extension to address this! Check it out!

http://community.stencyl.com/index.php/topic,34277.0.html