Author Topic: how to disable resize / rescale  (Read 9132 times)

krur

  • Guest
how to disable resize / rescale
« on: May 21, 2012, 03:46:01 AM »
hi

i can't find a way to have all my NGUI elements with fixed sizes: i don't want them to scale on lower screen resolution (i just want them to keep the relative positions to screen corners)

is it possible?

thank you

stefano

Shelt

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 14
    • View Profile
Re: how to disable resize / rescale
« Reply #1 on: May 21, 2012, 04:33:07 AM »
Make sure to have the "Automatic" option unchecked in the UIRoot

krur

  • Guest
Re: how to disable resize / rescale
« Reply #2 on: May 21, 2012, 04:48:13 AM »
actually i did disable it (it's the only setting related to automatic scaling that i found)
but they it doesn't seem to work.. the widgets get scaled when launching the player with different resolutions!

uhmmmm

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: how to disable resize / rescale
« Reply #3 on: May 21, 2012, 07:23:58 AM »
Use UIAnchor to attach them to corners. UIRoot with 'automatic' on will keep your widgets in pixel coordinates, meaning they will always take X number of pixels on the screen regardless of the size of the screen. If the 'automatic' is off, they will scale with the resolution changes, and will stay the same size proportionally relative to the screen's height.

krur

  • Guest
Re: how to disable resize / rescale
« Reply #4 on: May 21, 2012, 08:13:09 AM »
i as already using UIAnchor .. all widgets stays perfectly relative to the screen corners..
but they keep resizing proportionally to the screen size :(

isn't there any sample scene anywhere?

thank you!


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: how to disable resize / rescale
« Reply #5 on: May 21, 2012, 08:19:35 AM »
Uncheck "automatic" on UIRoot and they will stay the same size in pixels.