Author Topic: Sizing UI for different devices.  (Read 2439 times)

ismithers

  • Guest
Sizing UI for different devices.
« on: September 29, 2013, 10:17:09 PM »
I've been searching on this topic an awful lot, and would like someone to confirm my thinking on it:

1) I design my UI at a specific resolution, say iPhone 5 portrait 640x1136.
2) I set my UIRoot to FixedSizeOnMobiles and give it a height of 1136 to match the above.
3) At this point everything will be PixelPerfect if I understand things correctly.

Now the confusion enters.
a) What do I do when I go to a new device?
b) Should font textures be in the atlas with the other textures? Won't this mess things up IF you set the pixelsize on the atlas?
c) When should/should not I set the pixel size or swap out the atlas?
d) How do sliced sprites get handled for different resolutions? Should they also 'just work'?

I think I've been staring at this too long and feel like I've over-complicated it an awful lot, and now I can't see the forest for the trees.

Thanks,
Ian
« Last Edit: September 29, 2013, 10:35:13 PM by ismithers »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Sizing UI for different devices.
« Reply #1 on: September 30, 2013, 11:18:22 AM »
Do you want to do the whole SD/HD atlas swap? If so then yes, work with a fixed size root, and create 3 atlases. First atlas is your SD atlas. Second atlas is your HD atlas. Sprite names in both atlases must match. The last atlas is your Reference atlas. Set it to point to either HD or SD. If SD has pixel size of 1, then HD needs to have a pixel size of 0.5, and sprites inside it need to be exactly twice the width and height of your SD atlas. There are plenty of topics on the matter in the forum, including an atlas swapping script.