public static void GetVisiblePanelViewControllers(IPanelStackSystem stack, IList <IPanelViewController> output)
        {
            output.Clear();

            for (int i = stack.Count - 1; i >= 0; i--)
            {
                var currentController = stack[i];

                output.Add(currentController);

                //Stop as soon as we hit a panel that is fully opaque
                if (currentController.PanelType.visibility == PanelType.Visibility.Opaque)
                {
                    return;
                }
            }
        }
        private static PanelStackController CreateStackController(IPanelStackSystem stackSystem = null, IPanelViewContainer viewContainer = null, IUIEventManager eventManager = null)
        {
            if (stackSystem == null)
            {
                stackSystem = new FakePanelStackSystem();
            }

            if (viewContainer == null)
            {
                viewContainer = new FakeViewContainer();
            }

            if (eventManager == null)
            {
                eventManager = new FakeUIEventManager();
            }

            return(new PanelStackController(stackSystem, viewContainer, eventManager));
        }
Exemple #3
0
 public PanelStackController(IPanelStackSystem stackSystem, IPanelViewContainer viewContainer, IUIEventManager eventManager = null)
 {
     panelStackSystem  = stackSystem;
     container         = viewContainer;
     this.eventManager = eventManager;
 }