Author Topic: Has .SetDimensions been removed? UIWidget resizing problem.  (Read 2350 times)

Akraticus

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Has .SetDimensions been removed? UIWidget resizing problem.
« on: March 18, 2014, 10:25:29 AM »
I've been struggling with resizing a widget for a few hours now. Tried everything I could think of:
1. I directly set the height of the widget. Did nothing, even though it has been changed (when I debug.log it) the change doesn't occur.
2. After doing #1, I tried to SetDirty(), MarkAsChanged() and UpdateGeometry() with the variables changed. Still nothing.
3. I've read and re-read the documentation for UIWidget many times now, and to me it seems like I should have access to SetDimensions() which seems to be the OBVIOUS METHOD OF DOING THIS.

The widget is anchored, if that is of any relevance.


I'm going crazy. Please advise.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Has .SetDimensions been removed? UIWidget resizing problem.
« Reply #1 on: March 18, 2014, 08:05:17 PM »
NGUIMath.ResizeWidget can do that for you, however just setting width or height should work as well, whether it's anchored or not. That's assuming you are actually using the latest version, however.