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 void FocusChanged(eFocusState state)
 {
     if (OnFocusStateChange != null)
     {
         OnFocusStateChange.Invoke(state);
     }
 }
 public static bool IsInGameState(eFocusState state)
 {
     if (state.Equals(eFocusState.FPS) || state.Equals(eFocusState.InElevator))
     {
         return(true);
     }
     return(false);
 }
Exemple #4
0
 private void FocusChanged(eFocusState newState)
 {
     if (UI_Camera && Popup_Camera)
     {
         if (newState.Equals(eFocusState.GlobalPopupMessage))
         {
             Popup_Camera.enabled = true;
         }
     }
 }
Exemple #5
0
 public static void FocusChanged(eFocusState state)
 {
     if (OnFocusStateChange != null)
     {
         Log.Debug($"Switching to state {state}");
         currentState = state;
         OnFocusStateChange.Invoke(state);
         lastState = state;
     }
 }
 private void StateChange(eFocusState newState)
 {
     if (newState != eFocusState.FPS)
     {
         Toggle(false);
     }
     else
     {
         ChangedWeapon(ItemEquippableEvents.currentItem);
     }
 }
Exemple #7
0
        private void FocusStateChanged(eFocusState newState)
        {
            if (FocusStateEvents.lastState.Equals(eFocusState.InElevator) && newState.Equals(eFocusState.FPS))
            {
                CenterPlayerToOrigin();
            }

            if (newState.Equals(eFocusState.InElevator))
            {
                SetInitialRotationOffset();
            }
        }
        private void FocusStateChangedHaptics(eFocusState focusState)
        {
            if (!VRConfig.configUseBhaptics.Value)
            {
                return;
            }

            if (FocusStateEvents.lastState.Equals(eFocusState.InElevator) && focusState == eFocusState.FPS)
            {
                m_hapticPlayer.SubmitRegistered(VEST_LANDING_KEY);
                m_hapticPlayer.SubmitRegistered(ARMS_LANDING_KEY);
            }
        }
Exemple #9
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 #10
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;
            }
        }
Exemple #11
0
 public void Clicked()
 {
     mFocusState = eFocusState.eClicked;
 }
Exemple #12
0
 public void Deselect()
 {
     mFocusState = eFocusState.eNormal;
 }
Exemple #13
0
 public void Select()
 {
     mFocusState = eFocusState.eFocused;
 }
Exemple #14
0
        public Multimeter(string pLayerPath)
        {
            ImageLayers segments    = new ImageLayers("mSegments");
            ImageLayers subsegments = new ImageLayers("mSubsegments");

            mFocusState = eFocusState.eNormal;

            mClickedPaint       = new SKPaint();
            mClickedPaint.Color = new SKColor(0, 0, 0, 200);

            //New layer images
            mSegments    = new List <ImageLayers>();
            mSubSegments = new List <ImageLayers>();
            mBargraph    = new ImageLayers("mBargraph");
            mOther       = new ImageLayers("mOther");

            //Sort images into appropreate layered images
            string[] files = System.IO.Directory.GetFiles(pLayerPath);
            foreach (string filename in files)
            {
                if (filename.Contains("seg"))
                {
                    segments.AddLayer(filename);
                }

                else if (filename.Contains("sub"))
                {
                    subsegments.AddLayer(filename);
                }

                else if (filename.Contains("bar"))
                {
                    mBargraph.AddLayer(filename);
                }

                else
                {
                    mOther.AddLayer(filename);
                }
            }

            //Sort Images alphabetically within layered images
            subsegments.Sort();
            mBargraph.Sort();
            segments.Sort();
            mOther.Sort();

            //Sort segments and subsegments into seperate digits
            ImageLayers returned;
            int         i;

            //Setup the different segments
            i = 1;
            while (segments.Group("seg" + (i++).ToString(), out returned))
            {
                mSegments.Add(returned);
            }

            //Setup the different subsegments
            i = 1;
            while (subsegments.Group("sub" + (i++).ToString(), out returned))
            {
                mSubSegments.Add(returned);
            }

            //Move decimal point to the end
            foreach (ImageLayers temp in mSegments)
            {
                temp.ToBottom("dp");
            }

            foreach (ImageLayers temp in mSubSegments)
            {
                temp.ToBottom("dp");
            }
        }
 static void Prefix(eFocusState state)
 {
     FocusStateEvents.FocusChanged(state);
 }
Exemple #16
0
 public void FocusStateChanged(eFocusState newState)
 {
     // Do nothing yet
 }