Author Topic: [Bug] UILabel - scale issues  (Read 2270 times)

Pip Robbins

  • Guest
[Bug] UILabel - scale issues
« on: February 20, 2013, 10:39:53 PM »
There was a bit of reference found in this post http://www.tasharen.com/forum/index.php?topic=1326.0, but because it is a different issue I have decided to start a new thread.

I have set up panel like follows:

-- Panel
---- Table
------ Group Button
-------- Tween Scale
---------- Table
------------Sub Button
------------Sub Button
------------Sub Button
------ Group Button
-------- Tween Scale
---------- Table
------------Sub Button
------------Sub Button

Group buttons and sub buttons are added dynamically at run time or created by the user. Sub buttons can also be picked up and dragged then dropped on to another group button. When this happens the sub button is then attached to that group button.

The group buttons can also collapse (as such in the quest log example) so that all the sub buttons are hidden.

The Issue

When I drag a sub button on to the another group button which is collapsed, when I uncollapse it, its all perfect except the label is not showing. The label is there and in the correct position, just not visible - doing anything in the editor such as disabling then enabling, changing depth or z depth will fix the issue, but its only fixed in the editor after pausing making the change then playing. I cant seem to do anything via code to fix this. I've even tried MarkAsChange, MaxPositionPerfect.

On top of this, when I tables get adjusted and reposition errors also occur such as the button being in the correct spot, the label widget itself is also in the correct spot but visually on screen the label is in the old position / incorrect position.

I have followed advice is previous threads by not tweening to 0, but instead 0.01 and also the font is on the same atlas as the rest of the widgets.

Any solutions?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: [Bug] UILabel - scale issues
« Reply #1 on: February 21, 2013, 04:41:12 AM »
CheckParent() is needed to update the parent when you change it. Or was it CreatePanel()? One or the other. Or both! Check what I do in the drag & drop example.