Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: johanesnw on February 09, 2014, 11:34:26 PM

Title: UI Label resizeFreely while Anchoring?
Post by: johanesnw on February 09, 2014, 11:34:26 PM
is it possible to resize freely and resize height while anchoring?
If I click on that 2, it always goes to shrinkContent.
the clampContent option is fine tho.

this is the normal label that I anchored to icon's right
(http://i1260.photobucket.com/albums/ii566/ind0dark/1_zps1ad039c5.png) (http://s1260.photobucket.com/user/ind0dark/media/1_zps1ad039c5.png.html)

set the line max to 1.
when I tried this
(http://i1260.photobucket.com/albums/ii566/ind0dark/2_zpsd5bfc175.png) (http://s1260.photobucket.com/user/ind0dark/media/2_zpsd5bfc175.png.html)

can't choose overflow: "resizefreely". so I resize manually on play mode.
it's what I want
(http://i1260.photobucket.com/albums/ii566/ind0dark/3_zpsdeac9ae8.png) (http://s1260.photobucket.com/user/ind0dark/media/3_zpsdeac9ae8.png.html)

if I remove the anchor, it's worse
(http://i1260.photobucket.com/albums/ii566/ind0dark/4_zps2d9683f6.png) (http://s1260.photobucket.com/user/ind0dark/media/4_zps2d9683f6.png.html)
Title: Re: UI Label resizeFreely while Anchoring?
Post by: CJOwens on February 10, 2014, 11:59:40 AM
Having the same problem and it's really frustrating. Is this intended functionality? If so could you elaborate as to why and possibly suggest a workaround/better solution?
Title: Re: UI Label resizeFreely while Anchoring?
Post by: ArenMook on February 10, 2014, 05:17:35 PM
If you set the label to "resize freely", then it will adjust its width and height accordingly.

You need to use Advanced type anchors if you are mixing anchors and resizeable labels, and set only certain sides to be anchored.

For example to anchor a ResizeFreely label to the top left corner, change its pivot to top-left, set anchors to "Advanced", and only choose the top and left anchors. Don't set bottom and right.
Title: Re: UI Label resizeFreely while Anchoring?
Post by: CJOwens on February 11, 2014, 09:51:22 AM
I see, thanks.
Title: Re: UI Label resizeFreely while Anchoring?
Post by: johanesnw on February 12, 2014, 12:51:21 PM
wow. works perfectly.... thanks  ;D