示例#1
0
        internal void _OnHideComplete(AbstractView view, bool destroy = true)
        {
            if (view == null)
            {
                throw new UnityException("View cannot be null");
            }

            if (_debug)
            {
                Debug.LogFormat("[ViewController] Hide Complete: {0}, destroy: {1}", view.ToString(), destroy);
            }

            if (EventHideComplete != null)
            {
                EventHideComplete(this, view.GetType(), view.displayMode);
            }

            if (destroy)
            {
                view.DestroyView();
            }

            if (view.displayMode == ViewDisplayMode.Overlay)
            {
                // remove overlay from showing list
                if (_showingOverlays.Contains(view))
                {
                    _showingOverlays.Remove(view);
                }

                // process next overlay if one is queued
                if (_targetOverlay != null)
                {
                    System.Type location = _targetOverlay;
                    object      data     = _targetOverlayData;

                    // clear data
                    _targetOverlay     = null;
                    _targetOverlayData = null;

                    CreateViewAsOverlay(location, data);
                }
            }
            else if (view.displayMode == ViewDisplayMode.Location)
            {
                // process next location is one is queued
                if (view == _currentLocation && _targetLocation != null)
                {
                    System.Type location = _targetLocation;
                    object      data     = _targetLocationData;

                    // clear data
                    _targetLocation     = null;
                    _targetLocationData = null;

                    CreateViewAsLocation(location, data);
                }
            }
        }
示例#2
0
        internal void _OnHideStart(AbstractView view)
        {
            if (_debug)
            {
                Debug.LogFormat("[ViewController] Hide Start: {0}", view.ToString());
            }

            if (view != null && EventHideStart != null)
            {
                EventHideStart(this, view.GetType(), view.displayMode);
            }
        }
示例#3
0
        internal void _OnShowComplete(AbstractView view)
        {
            if (_debug)
            {
                Debug.LogFormat("[ViewController] Show Complete: {0}", view.ToString());
            }

            if (view != null && EventShowComplete != null)
            {
                EventShowComplete(this, view.GetType(), view.displayMode);
            }
        }