Пример #1
0
    void OnDisable()
    {
        OnDisabled();

        if (hideSystemUIWhileEnabled)
        {
//			SystemUtility.ShowSystemUI( true );
            SystemUIEvent sys = SystemUIEvent.Instance;
            if (sys != null)
            {
                sys.ShowSystemUI(true);
            }
        }

        if (deactiveObjWhileShowing != null)
        {
            deactiveObjWhileShowing.SetActive(true);
        }

        if (m_IsSkip)
        {
            ViNoEventManager.Instance.TriggerEvent("OnClickSkip");
            ViNo.skip = false;
        }
    }
Пример #2
0
    // Update is called once per frame
    void OnDisable()
    {
        SystemUIEvent sys = SystemUIEvent.Instance;

        if (sys != null)
        {
            sys.ShowSystemUI(true);
        }
//		SystemUtility.ShowSystemUI();
        ViNo.autoMode = m_TempAutoModeState;
    }
Пример #3
0
    static public void ShowSystemUI(bool t = true)
    {
        SystemUIEvent sys = SystemUIEvent.Instance;

        if (sys != null)
        {
            sys.ShowSystemUI(t);
        }
        else
        {
            Debug.LogWarning("SystemUIEvent not found.");
        }
    }
Пример #4
0
// Platform StandAlone Key Input.
#if UNITY_EDITOR || UNITY_STANDALONE || UNITY_WEBPLAYER
    // Update is called once per frame
    void Update()
    {
        SystemUIEvent sys = SystemUIEvent.Instance;

        if (sys != null)
        {
            ISelectionsCtrl sel = ISelectionsCtrl.Instance;
            if (sel != null && sel.IsActive())
            {
                return;
            }

            // Handle Keyboard.
            if (useKeyboard)
            {
                if (Input.GetKeyDown(KeyCode.Return))
                {
                    if (sys.IsActiveCurrentMessageTarget())
                    {
                        ViNoAPI.NextMessage();
                    }
                }

                if (Input.GetKeyDown(KeyCode.Escape))
                {
                    if (sys.IsActiveBackLog())
                    {
                        ViNoEventManager.Instance.TriggerEvent("ToggleActiveBackLog");
                    }
                    else if (sys.IsActiveConfig())
                    {
                        ViNoEventManager.Instance.TriggerEvent("ToggleActiveConfig");
                    }
                    else if (sys.IsActiveSaveLoadPanel())
                    {
                        ViNoEventManager.Instance.TriggerEvent("ToggleActiveSaveLoadPanel");
                    }
                    else
                    {
                        ViNoEventManager.Instance.TriggerEvent("ToggleActiveMenuPanel");
                    }
                }

                if (Input.GetKeyDown(KeyCode.UpArrow))
                {
                    ViNoEventManager.Instance.TriggerEvent("OnClickBackLog");
                }
                else if (Input.GetKeyDown(KeyCode.DownArrow))
                {
                    if (sys.IsActiveCurrentMessageTarget())
                    {
                        ViNoAPI.NextMessage();
//						ViNoEventManager.Instance.TriggerEvent( "ToggleActiveSaveLoadPanel" );
                    }
                }

                // Menu is Activated.
                bool isActiveMenuPanel = sys.IsActiveMenuPanel();
                if (isActiveMenuPanel)
                {
                    if (Input.GetKeyDown(KeyCode.S))
                    {
                        ViNoEventManager.Instance.TriggerEvent("OnClickSave");
                    }
                    else if (Input.GetKeyDown(KeyCode.L))
                    {
                        ViNoEventManager.Instance.TriggerEvent("OnClickLoad");
                    }
                    else if (Input.GetKeyDown(KeyCode.P))
                    {
                        ViNoEventManager.Instance.TriggerEvent("ToggleActiveConfig");
                    }
                }
                // Normal.
                else
                {
                    if (Input.GetKeyDown(KeyCode.S))
                    {
                        ViNoEventManager.Instance.TriggerEvent("ShowSavePanel");
                    }
                    else if (Input.GetKeyDown(KeyCode.L))
                    {
//						ViNoEventManager.Instance.TriggerEvent( "OnClickLoad" );
                        ViNoEventManager.Instance.TriggerEvent("ShowLoadPanel");
                    }
                    else if (Input.GetKeyDown(KeyCode.A))
                    {
                        ViNoEventManager.Instance.TriggerEvent("OnClickAuto");
                    }

/*					else if( Input.GetKeyDown( KeyCode.S ) ){
 *                                              ViNoEventManager.Instance.TriggerEvent( "OnClickSkip" );
 *                                      }
 *                                      else if( Input.GetKeyDown( KeyCode.L ) ){
 *                                              ViNoEventManager.Instance.TriggerEvent( "ToggleActiveBackLog" );
 *                                      }
 * //*/
                }

                if (Input.GetKeyDown(KeyCode.Space) ||
                    Input.GetKeyDown(KeyCode.RightArrow) || Input.GetKeyDown(KeyCode.LeftArrow))
                {
                    bool t = sys.IsActiveSystemUI( );
                    sys.ShowSystemUI(!t);
                }
            }

            // Handle Mouse Wheel.
            if (useMouseWheelScroll)
            {
                float scroll = Input.GetAxis("Mouse ScrollWheel");

                bool isActiveSystem = sys.IsActiveSystemUI( );

                // Wheel Up and show BackLog.
                if (isActiveSystem && scroll > 0)
                {
                    ViNoEventManager.Instance.TriggerEvent("OnClickBackLog");
                }
                // Wheel Down and Next Message.
                else if (scroll < 0)
                {
                    if (isActiveSystem && sys.IsActiveCurrentMessageTarget())
                    {
                        ViNoAPI.NextMessage();
                    }
                }
            }
        }
    }