Author Topic: Scaling entire Window  (Read 1827 times)

Manmax75

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 32
    • View Profile
Scaling entire Window
« on: July 02, 2013, 10:34:10 AM »
Hey.
Firstly I'd like to say how great NGUI is, it's an incredibly useful tool and definitely worth the money.
I'm pretty new to NGUI and while I know some aspects, I'm no guru in it.. and I have seem to ran into a dilemma.

I'm creating an in-game inventory-type menu (seen below).


This is the reference that I built in photoshop. So I know where to place the individual controls, etc. Ultimately this should be the final product inside of unity.
Now, I want the entire window itself with all the controls to scale accordingly to the screen resolution. I tried putting a UIStretch on the Panel object, but when I put objects into the panel they scaled into a ridiculously huge amount and went completely off screen.

How can I approach this so that the entire window is scalable to the current screen resolution?
Do I need to put an anchor and a UIStrech on each individual control? Or is there an easier way?

Any help is greatly appreciated :)
« Last Edit: July 02, 2013, 10:55:33 AM by Manmax75 »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Scaling entire Window
« Reply #1 on: July 02, 2013, 10:41:50 AM »
UIStretch is meant to go on the individual widgets, and cannot be placed on the container game objects.

Your UI is going to be challenging to do with NGUI. Main reason being the whick non-tileable borders, and the interlaced (again non-tileable) background on the UI elements.

If you are really set on this kind of look, your best bet is to split it up into as many "lego-like" components as possible, or you will end up using a ton of texture memory.