Author Topic: Multi-resolution problem when using NGUI  (Read 2588 times)

choijhy7

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Multi-resolution problem when using NGUI
« on: December 29, 2013, 08:38:43 PM »
I'm working with NGUI, I wonder how to resolve the problem about multi-resolution.

To help understand easily, I'll attach two screenshots.

First one is the case of GalaxyS3(1280x720).
Second one is the case of iPad(1024x768).

Basically, screens are made with anchor, so UIs are aligned with top, bottom and center base.
And I used this source code.
http://output.willway.net/?p=44
It manipulates manual height of UIRoot, and make UI fit with its screen height.

GalaxyS3 has long screen, but its ok because my purpose is to fill the whole screen.
But second case, in iPad, there's black area on left, right side.

How can I solve this problem?

What I want to do is fill the whole screen on any resolution.
Hm, or, isn't it needed? May I leave this as it is?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Multi-resolution problem when using NGUI
« Reply #1 on: December 29, 2013, 11:32:16 PM »
You two resolutions have different aspect ratios, which means that there is more to see on the left and right on one of them than the other. It's inevitable. The only way to prevent this is to squish or stretch your UIs, which will look quite ugly (circular and square shapes will become oval and rectangular instead).

It's quite common to fill the "gap" on the sides with some "filler" overlay, such as a tiled background.