Author Topic: Resolution switch problems on iPhone and iPad  (Read 14831 times)

Tripwire

  • Full Member
  • ***
  • Thank You
  • -Given: 9
  • -Receive: 0
  • Posts: 163
    • View Profile
Re: Resolution switch problems on iPhone and iPad
« Reply #30 on: January 07, 2013, 02:55:01 PM »
Sorry to Hijack this thread but i seem to have some problems with resolutions changing too. I have an App and the GUI is made for the iPhone 5 but has to be used for iPhone 4 and 3GS too. Now it scales the height but not the width :(

UIRoot settings:
Automatic = off
Manual Height = 1136
Minimum Height = 480
Maximum Height = 1136

PapaWhiskey

  • Guest
Re: Resolution switch problems on iPhone and iPad
« Reply #31 on: January 11, 2013, 12:03:03 PM »
Sorry to Hijack this thread but i seem to have some problems with resolutions changing too. I have an App and the GUI is made for the iPhone 5 but has to be used for iPhone 4 and 3GS too. Now it scales the height but not the width :(

UIRoot settings:
Automatic = off
Manual Height = 1136
Minimum Height = 480
Maximum Height = 1136

I still don't have 100% concrete answers on this, after watching too many videos, reading too many forum posts, trying ratioFix scripts, etc....

so lets try a simple q&a...

say you use one atlas for all resolutions...you design your UI at a "middle ground" resolution., for this example lets say..720x1280 (portrait)

we have three variables and a tick box to muck with
automatic off (seems to be what most folks want for this problem)
manual height = ? (the height of the original ui design resolution? 1280 in this example?)
min height = ? (the minimum targeted device height?)
max height = ? (the maximum targeted device height?)

should you adjust manual height at runtime when the resolution height is not 1280? (the original ui design height).
should you only adjust manual height to match the original UI design (if you had SD/HD atlas...you'd change the manual height when you change atlas?)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Resolution switch problems on iPhone and iPad
« Reply #32 on: January 11, 2013, 01:19:05 PM »
If the 'automatic' checkbox is off, min/max values do nothing. They are only used to restrict the automatically scaled UIRoot. In your case, set the height to a manual value of 1280 and design your UI. No need to adjust anything afterwards.

If, however, you need things to be "glued" to sides of the screen at any point, you will want to do so by making your UI modular and using UIAnchors.

PapaWhiskey

  • Guest
Re: Resolution switch problems on iPhone and iPad
« Reply #33 on: January 11, 2013, 04:38:27 PM »
If the 'automatic' checkbox is off, min/max values do nothing. They are only used to restrict the automatically scaled UIRoot. In your case, set the height to a manual value of 1280 and design your UI. No need to adjust anything afterwards.

If, however, you need things to be "glued" to sides of the screen at any point, you will want to do so by making your UI modular and using UIAnchors.

got it...

okay now a simple anchor question...should i put the anchored button/label/sprite as a child of the panel that has the center anchor? or should they be at the same level under their own anchor? (ala UIAnchor sample)...

what happens if you make a hierarchy of

UIRoot
  ->Camera
     ->Center Anchor
        ->Panel 1 (some window)
        ->Panel 2 (another window)
           ->Anchor BottomLeft
              ->Button


PapaWhiskey

  • Guest
Re: Resolution switch problems on iPhone and iPad
« Reply #34 on: January 11, 2013, 06:12:30 PM »
also...back to one of my original issues...in the UIAnchor demo the "background" is under Anchor Center, yet when you run different resolutions (even in your video example) parts of the background get cut off...yes the 9 "edge" anchors work great...but the background that is on anchor center will lose data top/bot/lt/rt ...that is not acceptable if your bg is an integral part of the scene...whats the solution? I havent seen it yet in the forum (or i forgot it because i've read too many posts)

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Resolution switch problems on iPhone and iPad
« Reply #35 on: January 11, 2013, 07:41:19 PM »
It depends on how you are handling multiple resolutions.

If you are changing the Manualheight of UIRoot, you will have to adjust your background to use the new size of the "virtual pixels" that UIRoot provides in the local transform.

If you are using automatic, it should handle itself, I believe, unless of course you change aspect, which you also will have to take into account yourself. Ipad - iphone are obvious examples of two different aspects.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Resolution switch problems on iPhone and iPad
« Reply #36 on: January 11, 2013, 08:03:39 PM »
Anchors should be above panels, ideally.

UIRoot
  ->Camera
     ->Center Anchor
        ->Panel 1 (some window)
     ->BottomLeft Anchor
        ->Panel 2 (another window)
           ->Button