private void OnPushState(UserInterfacePortMenuManager.State state)
        {
            switch (state)
            {
            case UserInterfacePortMenuManager.State.FirstOpenMain:
                this.OnPushFirstOpenMain();
                break;

            case UserInterfacePortMenuManager.State.MainMenu:
                this.OnPushMainMenu();
                break;

            case UserInterfacePortMenuManager.State.SubMenu:
                this.OnPushSubMenu();
                break;

            case UserInterfacePortMenuManager.State.MoveToSubMenu:
                this.OnPushMoveToSubMenu();
                break;

            case UserInterfacePortMenuManager.State.MoveToMainMenu:
                this.OnPushMoveToMainMenu();
                break;
            }
        }
        private void OnLongPressEventListener()
        {
            bool flag  = this.mStateManager.CurrentState == UserInterfacePortMenuManager.State.MainMenu || this.mStateManager.CurrentState == UserInterfacePortMenuManager.State.SubMenu;
            bool flag2 = this.IsControllable();

            if (flag && flag2)
            {
                UserInterfacePortMenuManager.State currentState = this.mStateManager.CurrentState;
                if (currentState != UserInterfacePortMenuManager.State.MainMenu)
                {
                    if (currentState == UserInterfacePortMenuManager.State.SubMenu)
                    {
                        this.mStateManager.PopState();
                        this.mStateManager.PushState(UserInterfacePortMenuManager.State.MoveToMainMenu);
                        if (SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide() != null)
                        {
                            SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide().Show();
                        }
                    }
                }
                else
                {
                    this.mStateManager.PopState();
                    this.mStateManager.PushState(UserInterfacePortMenuManager.State.MoveToSubMenu);
                    if (SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide() != null)
                    {
                        SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide().Hide();
                    }
                }
            }
        }
 private void Update()
 {
     if (this.mKeyController != null)
     {
         if (this.mKeyController.keyState.get_Item(14).down)
         {
             if (this.mStateManager.CurrentState == UserInterfacePortMenuManager.State.MainMenu || this.mStateManager.CurrentState == UserInterfacePortMenuManager.State.SubMenu)
             {
                 this.OnPressKeyLeft();
             }
         }
         else if (this.mKeyController.keyState.get_Item(10).down)
         {
             if (this.mStateManager.CurrentState == UserInterfacePortMenuManager.State.MainMenu || this.mStateManager.CurrentState == UserInterfacePortMenuManager.State.SubMenu)
             {
                 this.OnPressKeyRight();
             }
         }
         else if (this.mKeyController.keyState.get_Item(8).down)
         {
             if (this.mStateManager.CurrentState == UserInterfacePortMenuManager.State.MainMenu || this.mStateManager.CurrentState == UserInterfacePortMenuManager.State.SubMenu)
             {
                 this.OnPressKeyUp();
             }
         }
         else if (this.mKeyController.keyState.get_Item(12).down)
         {
             if (this.mStateManager.CurrentState == UserInterfacePortMenuManager.State.MainMenu || this.mStateManager.CurrentState == UserInterfacePortMenuManager.State.SubMenu)
             {
                 this.OnPressKeyDown();
             }
         }
         else if (this.mKeyController.keyState.get_Item(4).down)
         {
             if (this.mStateManager.CurrentState == UserInterfacePortMenuManager.State.MainMenu || this.mStateManager.CurrentState == UserInterfacePortMenuManager.State.SubMenu)
             {
                 UserInterfacePortMenuManager.State currentState = this.mStateManager.CurrentState;
                 if (currentState != UserInterfacePortMenuManager.State.MainMenu)
                 {
                     if (currentState == UserInterfacePortMenuManager.State.SubMenu)
                     {
                         this.mStateManager.PopState();
                         this.mStateManager.PushState(UserInterfacePortMenuManager.State.MoveToMainMenu);
                         if (SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide() != null)
                         {
                             SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide().Show();
                         }
                     }
                 }
                 else
                 {
                     this.mStateManager.PopState();
                     this.mStateManager.PushState(UserInterfacePortMenuManager.State.MoveToSubMenu);
                     if (SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide() != null)
                     {
                         SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide().Hide();
                     }
                 }
             }
         }
         else if (this.mKeyController.keyState.get_Item(5).down)
         {
             if (this.mStateManager.CurrentState == UserInterfacePortMenuManager.State.MainMenu || this.mStateManager.CurrentState == UserInterfacePortMenuManager.State.SubMenu)
             {
                 this.ChangeFocusButton(this.mUIPortMenuButton_Sally);
                 this.mUIPortMenuButton_Current.ClickEvent();
             }
         }
         else if (this.mKeyController.keyState.get_Item(1).down)
         {
             bool flag = this.mStateManager.CurrentState == UserInterfacePortMenuManager.State.MainMenu || this.mStateManager.CurrentState == UserInterfacePortMenuManager.State.SubMenu;
             if (flag)
             {
                 this.mUIPortMenuButton_Current.ClickEvent();
             }
         }
     }
 }