Author Topic: Full Screen Resolution Issue  (Read 2283 times)

malast

  • Guest
Full Screen Resolution Issue
« on: May 13, 2012, 09:03:10 AM »
One of the requirements to my app is that GUI must look equals in window mode and in full screen mode. That means:
1) if button in in app window corner in window mode, it must be in such screen corner when in fullscreen
2) all controls must keep their size in pixels when switching to full screen.

My window mode application screen dimensions are 827x517. I must keep such dimensions when in fullscreen, and switch to fullscreen just setting Screen.fullscreen = true. What NGUI parameters must I change when switching to fullscreen to keep GUI controls size and to fit GUI dimensions to fullscreen proportions?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Full Screen Resolution Issue
« Reply #1 on: May 13, 2012, 10:01:46 AM »
You're contradicting yourself here. First you're saying that the controls must keep their size in pixels, then you say you want the GUI to be proportionate. The two are on the opposite ends of the spectrum. 200 pixels on 1920x1080 is way different from 200 pixels on 320x480, so which one do you want? If you want them to be the same size proportionally, set your UIRoot to be manual and define the target size you want. If you want them to be pixel-perfect (same size in pixels, thus being bigger / smaller on different resolutions), then leave UIRoot as automatic. In either case, you will want to use UIAnchor to position widgets in corners and attached to sides of the screen.

malast

  • Guest
Re: Full Screen Resolution Issue
« Reply #2 on: May 13, 2012, 10:09:18 AM »
I want my controls have exact size and look exactly equal in fullscreen and window mode. For example, if sprite have 1 inch width in window, it must be 1 inch in fullscreen. When I talk about proportions, I mean that controls must save their position in screen corner or near screen edge.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Full Screen Resolution Issue
« Reply #3 on: May 13, 2012, 10:22:27 AM »
Just UIAnchor them.