Author Topic: Tween Changing Label Line Width  (Read 3592 times)

genericdeveloper

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Tween Changing Label Line Width
« on: February 07, 2013, 06:55:42 AM »
Hello. I hope this isn't a confusing post. It's my first attempt at addressing this forum and if I make a mistake I would appreciate any help rectifying that.

So first, what I'm doing is playing with the Example 9 - Quest Log example in order to figure out how some components work. This is mainly for the UITable and its elements. I'm trying to make it so that the Quests are 2 column based so that they expand accordingly in a two column fashion. And, it seems to work for the most part, except I have issues with the "Label - Descriptions" when I expand them with the tween.

What happened is that I made it so the Initial Label - Title and SlicedSprite have all been changed to a 200 x scale. This made it so the elements would be smaller and would display correctly in the drag-able panel. Following that I figured I would set the line width of the Label - Description to 200 thinking that on tween it would just expand the description to the equal width specified. This was not the case. What happens is that on tween, it changes the line width to 390 and expands it all the way across the sub panel.

I have tried a number of different methods to try and resolve this, but I don't think I'm understanding what's causing the issue here. Attached are two images demonstrating this. The "Initial Configuration" shows the line width at 200, and then the "Configuration After Tween" shows the line width at 390. I just can't figure out what the issue is.

There is also a different concern I have altogether, I'm not quite sure how to also make it so the sliced sprite that serves as the background for the quest scales with the word wrapping of the label. Is there a way to make it so that the background scales with the word wrapped label accordingly?

Please forgive me if this has been asked in some form or variation before. I tried searching and came up with nothing.

I look forward to any help provided.

genericdeveloper

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Tween Changing Label Line Width
« Reply #1 on: February 07, 2013, 06:56:50 AM »
Hrm. It appears that I have to separately add the other image on account that the files cumulatively are over the attachment limit. This is the following image that shows the line width has for some reason changed to 390.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tween Changing Label Line Width
« Reply #2 on: February 07, 2013, 10:08:22 AM »
The tweens in that example are pre-configured with a specific scale in mind. Select the individual objects and find the tweens.