/// <summary> /// Hide coroutine. /// </summary> /// <returns>The coroutine.</returns> /// <param name="item">Item.</param> protected virtual IEnumerator HideCoroutine(AccordionItem item) { if (ResizeMethod == ResizeMethods.Size) { yield return(StartCoroutine(Animations.Collapse(item.ContentObjectRect, AnimationDuration, IsHorizontal(), UnscaledTime, () => { if (IsHorizontal()) { item.ContentLayoutElement.preferredWidth = -1; } else { item.ContentLayoutElement.preferredHeight = -1; } }))); } else if (ResizeMethod == ResizeMethods.Flexible) { yield return(StartCoroutine(Animations.CollapseFlexible(item.ContentObjectRect, AnimationDuration, IsHorizontal()))); } item.Open = false; if (DisableClosed) { item.ContentObject.SetActive(false); } else { var axis = IsHorizontal() ? RectTransform.Axis.Horizontal : RectTransform.Axis.Vertical; item.ContentObjectRect.SetSizeWithCurrentAnchors(axis, 0f); } UpdateLayout(); OnToggleItem.Invoke(item); }
// Token: 0x06004632 RID: 17970 RVA: 0x0017DA10 File Offset: 0x0017BE10 private IEnumerator HideCorutine(AccordionItem item) { yield return(base.StartCoroutine(Animations.Collapse(item.ContentObjectRect, 0.5f))); item.Open = false; item.ContentObject.SetActive(false); this.OnToggleItem.Invoke(item); yield break; }
/// <summary> /// Hides the corutine. /// </summary> /// <returns>The corutine.</returns> /// <param name="item">Item.</param> IEnumerator HideCorutine(AccordionItem item) { yield return(StartCoroutine(Animations.Collapse(item.ContentObjectRect))); item.Open = false; item.ContentObject.SetActive(false); OnToggleItem.Invoke(item); }
/// <summary> /// Hides the corutine. /// </summary> /// <returns>The corutine.</returns> /// <param name="item">Item.</param> protected virtual IEnumerator HideCorutine(AccordionItem item) { yield return(StartCoroutine(Animations.Collapse(item.ContentObjectRect, AnimationDuration, IsHorizontal()))); item.Open = false; item.ContentObject.SetActive(false); UpdateLayout(); OnToggleItem.Invoke(item); }