public override void Destroy(RichElement element, GameObject gameObject) { if (gameObject) { NGUIRichTextUtil.DestroyAnimationImage(gameObject); base.Destroy(element, gameObject); } }
void Generate() { if (m_richText) { m_richText.SetSyntaxText(m_richSyntax); if (m_widget) { NGUIRichTextUtil.AdjustDepth(m_richText.gameObject, m_widget.depth); } } }
public override GameObject Create(RichElement element) { var imageGO = base.Create(element); if (imageGO != null) { var animationImage = element as NGUIRichElementAnimationImage; Debug.Assert(animationImage != null); NGUIRichTextUtil.CreateAnimationImage(imageGO, animationImage.GetImage(), animationImage.GetImageCount(), animationImage.GetAnimFPS()); } return(imageGO); }
void OnDimensionChangeInternal() { if (m_richText) { if (m_widget) { if (m_richText.GetTextWidth() != m_widget.width) { m_richText.SetTextWidth(m_widget.width); m_richText.Format(); if (m_widget) { NGUIRichTextUtil.AdjustDepth(m_richText.gameObject, m_widget.depth); } } } } }