Exemple #1
0
        public void FocusChanged(eFocusState state)
        {
            if (state.Equals(eFocusState.FPS) || state.Equals(eFocusState.InElevator))
            {
                HandleIngameFocus();
            }

            if (state.Equals(eFocusState.MainMenu) || state.Equals(eFocusState.Map))
            {
                HandleOutOfGameFocus();
            }

            if (state.Equals(eFocusState.ComputerTerminal))
            {
                SteamVR_Render.unfocusedRenderResolution = 1f;
                SteamVR.instance.overlay.ShowKeyboard(0, 0, "Terminal input", 256, "", true, 0);

                OrientKeyboard();
            }
            else
            {
                SteamVR.instance.overlay.HideKeyboard();
                SteamVR_Render.unfocusedRenderResolution = .5f;
            }
            ClearUIRenderTex();
        }
 public static bool IsInGameState(eFocusState state)
 {
     if (state.Equals(eFocusState.FPS) || state.Equals(eFocusState.InElevator))
     {
         return(true);
     }
     return(false);
 }
Exemple #3
0
 public static bool IsInGame()
 {
     if (currentState.Equals(eFocusState.FPS) || currentState.Equals(eFocusState.InElevator))
     {
         return(true);
     }
     return(false);
 }
Exemple #4
0
        private void FocusStateChanged(eFocusState newState)
        {
            if (FocusStateEvents.lastState.Equals(eFocusState.InElevator) && newState.Equals(eFocusState.FPS))
            {
                CenterPlayerToOrigin();
            }

            if (newState.Equals(eFocusState.InElevator))
            {
                SetInitialRotationOffset();
            }
        }
Exemple #5
0
        public void FocusChanged(eFocusState state)
        {
            if (state.Equals(eFocusState.FPS) || state.Equals(eFocusState.InElevator))
            {
                HandleIngameFocus();
            }

            if (state.Equals(eFocusState.MainMenu) || state.Equals(eFocusState.Map) || state.Equals(eFocusState.GlobalPopupMessage))
            {
                HandleOutOfGameFocus();
            }

            ClearUIRenderTex();
        }
Exemple #6
0
 private void FocusChanged(eFocusState newState)
 {
     if (UI_Camera && Popup_Camera)
     {
         if (newState.Equals(eFocusState.GlobalPopupMessage))
         {
             Popup_Camera.enabled = true;
         }
     }
 }
Exemple #7
0
        private void FocusStateChanged(eFocusState state)
        {
            if (state.Equals(eFocusState.ComputerTerminal))
            {
                SteamVR_Render.unfocusedRenderResolution = 1f;
                SteamVR.instance.overlay.ShowKeyboard(0, 0, "Terminal input", 256, "", true, 0);
                m_chatMode = false;

                OrientKeyboard();
            }
            else if (state.Equals(eFocusState.FPS_TypingInChat))
            {
                SteamVR_Render.unfocusedRenderResolution = 1f;
                SteamVR.instance.overlay.ShowKeyboard(0, 0, "Chat input", 256, "", false, 0);
                OrientKeyboard();
                m_chatMode = true;
            }
            else
            {
                SteamVR.instance.overlay.HideKeyboard();
                SteamVR_Render.unfocusedRenderResolution = .5f;
            }
        }