Author Topic: NGUI 3.0.8 - Uniform Scaling and Scale-from-Center  (Read 5954 times)

kromenak

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 14
    • View Profile
NGUI 3.0.8 - Uniform Scaling and Scale-from-Center
« on: January 07, 2014, 10:06:23 PM »
I've just started upgrading my project from NGUI 2.x to the latest version of NGUI.  All is compiling and the game is looking pretty decent, except for most of my text and graphics are not the right sizes anymore (I think as a result of not using the transform scale anymore, and widget scale being reset to 1).

I'm trying to resize my various widgets and texts, but I'm running into some possibly "dumb" issues:
  • A great feature of the Transform scale tool is that it allows uniform scale along all axis.  Is there a way to adjust the dimensions of a widget uniformly? I'm finding editing the two dimension values separately to be a huge pain, especially when the widget is not a square image.
  • Similarly, I really like being able to scale from the center point of an object.  I noticed that when I scale using the handles, it will change the widget's position as well, which is making resizing more complicated than it needs to be.  Is there a way to scale a widget from it's center point using handles or some other NGUI tool?

I'm concerned that it isn't possible to do these things with the latest NGUI changes, but I'm also wondering if I'm just missing shortcut keys or some unobvious feature.

Cripple

  • TNP Alpha
  • Full Member
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 117
    • View Profile
Re: NGUI 3.0.8 - Uniform Scaling and Scale-from-Center
« Reply #1 on: January 08, 2014, 03:26:17 AM »
Hi,

You can force an Widget to keep it aspect ratio based on the width or the height. If you force that, the next time that you resize the widget, it will be resized according to this.
Graphicstream Dev.