public void BeginAnimating(TreeViewAnimationInput setup) { if (m_Setup != null) { if (m_Setup.item.id == setup.item.id) { if (m_Setup.elapsedTime >= 0.0) { setup.elapsedTime = m_Setup.animationDuration - m_Setup.elapsedTime; } else { Debug.LogError(("Invaid duration " + m_Setup.elapsedTime)); } m_Setup = setup; } else { m_Setup.FireAnimationEndedEvent(); m_Setup = setup; } m_Setup.expanding = setup.expanding; } m_Setup = setup; if (m_Setup == null) { Debug.LogError("Setup is null"); } if (printDebug) { Console.WriteLine("Begin animating: " + m_Setup); } m_CurrentClipRect = GetCurrentClippingRect(); }
private void ExpansionAnimationEnded(TreeViewAnimationInput setup) { if (setup.expanding) { return; } ChangeExpandedState(setup.item, false); }
public void OnBeforeAllRowsGUI() { if (!isAnimating) { return; } m_CurrentClipRect = GetCurrentClippingRect(); if (m_Setup.elapsedTime <= m_Setup.animationDuration) { return; } m_Setup.FireAnimationEndedEvent(); m_Setup = null; if (!printDebug) { return; } Debug.Log("Animation ended"); }