Labels position change (not the same for all platform)

jihem

  • *
  • Posts: 161
Since the following change, my label positions aren't the same in Flash and iPad (with 384x512 scene x4 graphics, 32x32 tiles).  I have made buttons with tiles and I place my text using a labels (in the middle) => ipad text isn't in the button but at the top (and if I change, in Flash it appears under it).

January 19, 2013
- [Fix] Labels don't top-align on C++ targets.
while (!success=retry());

Jon

  • *
  • Posts: 17524
Can you provide a demo?

jihem

  • *
  • Posts: 161
I have this problem on the menu (extracted from a puzzle game in progress).
while (!success=retry());

jihem

  • *
  • Posts: 161
Hi,
I have solved my problem using Engine.SCALE to place the labels at the good place (for Flash, Simulator and iPad). It works. I think you should adapt the Labels extension (to use the Engine.SCALE).

With s=Engine.SCALE, the y translation can be determined (without test) :
tY=(-16.s^2+144.s-128)/3 => tY(1)->0, tY(2)->32 and tY(4)->64.

If you need more explanation, tY is form of 32.(x-1)(x-4)/-2+64.(x-1)(x-2)/6
First term equals 0 for 1 and 4, give 32 for 2 => (2-2)(2-4)/-2 = 1
Second term equals 0 for 1 and 2, give 64 for 4 => (4-1)(4-2)/6 = 1

Regards,
jihem
while (!success=retry());