Author Topic: Can't resize UIWidget when anchor type is unified.  (Read 5326 times)

Kichang Kim

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Can't resize UIWidget when anchor type is unified.
« on: January 09, 2014, 07:43:51 AM »
Hi. I'm working my new project with NGUI 3.0.8 f7 and found some uncomfortable features about UIWidget.

When I set anchor type to unified of UIWidget, I can't resize it in editor. I can only rotate and move.
Only method to resize is set relative position in anchor setting (also Dimensions setting in Widget is disabled). This is too uncomfortable. Is there any method to resize UIWidget with unified anchor?


Shifty Geezer

  • Full Member
  • ***
  • Thank You
  • -Given: 7
  • -Receive: 9
  • Posts: 226
    • View Profile
Re: Can't resize UIWidget when anchor type is unified.
« Reply #1 on: January 09, 2014, 08:25:37 AM »
You're right. Anchoring supersedes scaling. Use a container widget with your anchor to specify relative position and place your other widgets inside where you can adjust them in the context of their container.

John.Bergman

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 30
    • View Profile
Re: Can't resize UIWidget when anchor type is unified.
« Reply #2 on: January 09, 2014, 02:27:15 PM »
Feature Request:  Have the ability to lock/unlock the anchors to allow rescaling.

I see this as unlock the anchor, but keep the orientation
adjust the widget
relock the anchor, which would recalculate the offsets.

jgodfrey

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: Can't resize UIWidget when anchor type is unified.
« Reply #3 on: January 09, 2014, 03:45:53 PM »
Why can't you simply turn off the Unified anchor, move the widget, and turn the Unified anchor back on?  How does that differ from your proposed lock/unlock feature?

John.Bergman

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 30
    • View Profile
Re: Can't resize UIWidget when anchor type is unified.
« Reply #4 on: January 09, 2014, 04:36:39 PM »
You can.

8 clicks + memory vs. 2 clicks. :-)  Just seems like a pretty common task, I know I do this a lot while tweaking things... seems like it would be a timesaver.

jgodfrey

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: Can't resize UIWidget when anchor type is unified.
« Reply #5 on: January 09, 2014, 05:01:31 PM »
Originally, I was thinking it was as simple as:

- Change the anchor type to "None"
- Move the UIWidget as necessary
- Reset the anchor type to "Unified"

However, after doing some quick testing, I see the anchor points may be redefined by NGUI at step #3 above.  Is that the real problem?  It seems that if the original anchor points were retained from step #1, that the above would be no more difficult to use than your proposed lock/unlock feature.  Is that true, or am I still missing something (which is entirely possible as I'm new to NGUI...)?

Thanks,

Jeff

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Can't resize UIWidget when anchor type is unified.
« Reply #6 on: January 09, 2014, 06:06:49 PM »
Anchored widgets can be resized in the editor (but not in inspector). However looking at your scene view, your handles seem to be grayed out? I'm not sure why that would be in your case. They shouldn't be. They should only get grayed out if you're resizing a label set to "resize freely".

Kichang Kim

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Re: Can't resize UIWidget when anchor type is unified.
« Reply #7 on: January 09, 2014, 08:27:43 PM »
Anchored widgets can be resized in the editor (but not in inspector). However looking at your scene view, your handles seem to be grayed out? I'm not sure why that would be in your case. They shouldn't be. They should only get grayed out if you're resizing a label set to "resize freely".

I can't resize all of widgets (sprite, label, and so on...). When I set anchor, inspector and handles are grayed and can't resize in editor. (even a label with no resize freely option!)
Is this bug?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Can't resize UIWidget when anchor type is unified.
« Reply #8 on: January 10, 2014, 06:09:25 PM »
Very much so. I am on vacation right now so I can't figure out when that was broken, but you can fix it by replacing your Widget Inspector with the attached file.

Kichang Kim

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Re: Can't resize UIWidget when anchor type is unified.
« Reply #9 on: January 10, 2014, 09:59:22 PM »
Very much so. I am on vacation right now so I can't figure out when that was broken, but you can fix it by replacing your Widget Inspector with the attached file.

Attached file works perfectly. Thanks ArenMook and all of replier.