Example #1
0
        protected virtual void HandlePanelMenuItemControllerVisibility(PanelMenuItemController targetPanelItemController)
        {
            if (isShown)
            {
                if (currentPanelMenuItemController == targetPanelItemController)
                {
                    targetPanelItemController.Hide(interactableObject);
                    currentPanelMenuItemController = null;
                    HideMenu(true);
                }
                else
                {
                    currentPanelMenuItemController.Hide(interactableObject);
                    currentPanelMenuItemController = targetPanelItemController;
                }
            }
            else
            {
                currentPanelMenuItemController = targetPanelItemController;
            }

            if (currentPanelMenuItemController != null)
            {
                currentPanelMenuItemController.Show(interactableObject);
                ShowMenu();
            }
        }
        private void HandlePanelMenuItemControllerVisibility(PanelMenuItemController targetPanelItemController)
        {
            if (isShown)
            {
                if (currentPanelMenuItemController == targetPanelItemController)
                {
                    targetPanelItemController.Hide(interactableObject);
                    currentPanelMenuItemController = null;
                    HideMenu(true);
                }
                else
                {
                    currentPanelMenuItemController.Hide(interactableObject);
                    currentPanelMenuItemController = targetPanelItemController;
                }
            }
            else
            {
                currentPanelMenuItemController = targetPanelItemController;
            }

            if (currentPanelMenuItemController != null)
            {
                currentPanelMenuItemController.Show(interactableObject);
                ShowMenu();
            }
        }