Esempio n. 1
0
 internal void CancelRebuild(InlineText text)
 {
     if (_feature != null && _feature.Context.RebuildTexts.Remove(text) && _feature.Context.RebuildTexts.Count == 0)
     {
         CanvasUpdateRegistry.UnRegisterCanvasElementForRebuild(this);
     }
 }
Esempio n. 2
0
        public virtual void OnHideEnd()
        {
            this.isAlive = false;
            CanvasUpdateRegistry.UnRegisterCanvasElementForRebuild(this);

            //this.OnHideEndEvent();
        }
Esempio n. 3
0
        public override void OnHideEnd()
        {
            this.isAlive = false;
            CanvasUpdateRegistry.UnRegisterCanvasElementForRebuild(this);

            base.OnHideEnd();
        }
Esempio n. 4
0
 protected override void OnDisable()
 {
     DeactivateInputField();
     UnregisterTextComponentDirtyCallbacks(_textComponent);
     CanvasUpdateRegistry.UnRegisterCanvasElementForRebuild(this);
     base.OnDisable();
 }
Esempio n. 5
0
 protected override void OnDisable()
 {
     CanvasUpdateRegistry.UnRegisterCanvasElementForRebuild(this);
     m_IsEnable = false;
     m_Inertia  = false;
     LayoutRebuilder.MarkLayoutForRebuild(transform.transform as RectTransform);
     base.OnDisable();
 }
 protected override void OnDisable()
 {
     m_Tracker.Clear();
     CanvasUpdateRegistry.UnRegisterCanvasElementForRebuild(this);
     LayoutRebuilder.MarkLayoutForRebuild(rectTransform);
     Canvas.willRenderCanvases -= OnWillRenderCanvases;
     base.OnDisable();
 }
Esempio n. 7
0
 protected override void OnDisable()
 {
     CanvasUpdateRegistry.UnRegisterCanvasElementForRebuild(this);
     if (canvasRenderer)
     {
         canvasRenderer.Clear();
     }
     base.OnDisable();
 }
Esempio n. 8
0
    protected override void OnDisable()
    {
        CanvasUpdateRegistry.UnRegisterCanvasElementForRebuild(this);

        m_HasRebuiltLayout = false;
        m_Velocity         = Vector2.zero;
        LayoutRebuilder.MarkLayoutForRebuild(rectTransform);
        base.OnDisable();
    }
Esempio n. 9
0
        protected override void OnDisable()
        {
            CanvasUpdateRegistry.UnRegisterCanvasElementForRebuild(this);

            _scroller?.StopScroll();
            m_Tracker.Clear();
            velocity = Vector2.zero;
            LayoutRebuilder.MarkLayoutForRebuild(rectTransform);
            base.OnDisable();
        }
Esempio n. 10
0
 protected override void OnDisable()
 {
     CanvasUpdateRegistry.UnRegisterCanvasElementForRebuild(this);
     m_HasRebuiltLayout = false;
     m_Velocity         = Vector2.zero;
     m_Jumping          = false;
     LayoutRebuilder.MarkLayoutForRebuild(gameObject.transform as RectTransform);
     StopAllCoroutines();
     CancelInvoke();
     base.OnDisable();
 }
Esempio n. 11
0
    protected override void OnDisable()
    {
        CanvasUpdateRegistry.UnRegisterCanvasElementForRebuild(this);

        if (m_HorizontalScrollbar)
            m_HorizontalScrollbar.onValueChanged.RemoveListener(SetHorizontalNormalizedPosition);
        if (m_VerticalScrollbar)
            m_VerticalScrollbar.onValueChanged.RemoveListener(SetVerticalNormalizedPosition);

        m_HasRebuiltLayout = false;
        bRunLateUpdated = false;
        base.OnDisable();
    }
Esempio n. 12
0
 /// <summary>
 ///   <para>See MonoBehaviour.OnDisable.</para>
 /// </summary>
 protected override void OnDisable()
 {
     CanvasUpdateRegistry.UnRegisterCanvasElementForRebuild((ICanvasElement)this);
     if ((bool)((UnityEngine.Object) this.m_HorizontalScrollbar))
     {
         this.m_HorizontalScrollbar.onValueChanged.RemoveListener(new UnityAction <float>(this.SetHorizontalNormalizedPosition));
     }
     if ((bool)((UnityEngine.Object) this.m_VerticalScrollbar))
     {
         this.m_VerticalScrollbar.onValueChanged.RemoveListener(new UnityAction <float>(this.SetVerticalNormalizedPosition));
     }
     this.m_HasRebuiltLayout = false;
     this.m_Tracker.Clear();
     this.m_Velocity = Vector2.zero;
     LayoutRebuilder.MarkLayoutForRebuild(this.rectTransform);
     base.OnDisable();
 }
Esempio n. 13
0
        protected virtual void BaseOnDisable()
        {
#if FIX_NEW_INPUTSYSTEM_SUPPORT
            // the coroutine will be terminated, so this will ensure it restarts when we are next activated
            BlinkCoroutine = null;

            DeactivateInputField();
            if (m_TextComponent != null)
            {
                m_TextComponent.UnregisterDirtyVerticesCallback(MarkGeometryAsDirty);
                m_TextComponent.UnregisterDirtyVerticesCallback(UpdateLabel);

                if (m_VerticalScrollbar != null)
                {
                    var onScrollbarValueChangedHandler = (UnityAction <float>)System.Delegate.CreateDelegate(
                        typeof(UnityAction <float>), this, "OnScrollbarValueChange");
                    m_VerticalScrollbar.onValueChanged.RemoveListener(onScrollbarValueChangedHandler);
                }
            }
            CanvasUpdateRegistry.UnRegisterCanvasElementForRebuild(this);

            // Clear needs to be called otherwise sync never happens as the object is disabled.
            if (CachedInputRenderer != null)
            {
                CachedInputRenderer.Clear();
            }

            if (m_Mesh != null)
            {
                DestroyImmediate(m_Mesh);
            }

            m_Mesh = null;

            // Unsubscribe to event triggered when text object has been regenerated
            var onTextChangedHandler = (System.Action <Object>)System.Delegate.CreateDelegate(
                typeof(System.Action <Object>), this, "ON_TEXT_CHANGED");

            TMPro_EventManager.TEXT_CHANGED_EVENT.Remove(onTextChangedHandler);

            BaseSelectableOnDisable();
#else
            base.OnDisable();
#endif
        }
Esempio n. 14
0
    public static int UnRegisterCanvasElementForRebuild_s(IntPtr l)
    {
        int result;

        try
        {
            ICanvasElement element;
            LuaObject.checkType <ICanvasElement>(l, 1, out element);
            CanvasUpdateRegistry.UnRegisterCanvasElementForRebuild(element);
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Esempio n. 15
0
        protected override void OnDisable()
        {
            CanvasUpdateRegistry.UnRegisterCanvasElementForRebuild(this);

            if (m_HorizontalScrollbar)
            {
                m_HorizontalScrollbar.onValueChanged.RemoveListener(SetHorizontalNormalizedPosition);
            }
            if (m_VerticalScrollbar)
            {
                m_VerticalScrollbar.onValueChanged.RemoveListener(SetVerticalNormalizedPosition);
            }

            m_HasRebuiltLayout = false;
            m_Tracker.Clear();
            m_Velocity = Vector2.zero;
            LayoutRebuilder.MarkLayoutForRebuild(rectTransform);
            base.OnDisable();
        }
Esempio n. 16
0
 public void DeactivateInputField()
 {
     Impl.DeactivateInputField();
     UnregisterTextComponentDirtyCallbacks(_textComponent);
     CanvasUpdateRegistry.UnRegisterCanvasElementForRebuild(this);
 }
Esempio n. 17
0
 protected void OnDisable()
 {
     CanvasUpdateRegistry.UnRegisterCanvasElementForRebuild(this);
 }
Esempio n. 18
0
 protected override void OnDisable()
 {
     CanvasUpdateRegistry.UnRegisterCanvasElementForRebuild(this);
     base.OnDisable();
 }