private void OnApplicationQuit()
        {
            DPSettings.config.wristPos = _wristOverlay.transform.localPosition;
            DPSettings.config.wristRot = _wristOverlay.transform.localEulerAngles;

            DPSettings.SaveSettingsJson();
        }
        public void SetWristHand(bool useLeft)
        {
            if (!isSilent)
            {
                DPSettings.config.wristHandLeft = useLeft;
            }

            if (useLeft)
            {
                if (!isSilent)
                {
                    WristboardManager.I._wristOverlay.SetOverlayTrackedDevice(DPOverlayTrackedDevice.LeftHand);
                }

                wristLeftHand.DOFade(1f, 0.3f);
                wristRightHand.DOFade(0f, 0.3f);
            }
            else
            {
                if (!isSilent)
                {
                    WristboardManager.I._wristOverlay.SetOverlayTrackedDevice(DPOverlayTrackedDevice.RightHand);
                }
                wristRightHand.DOFade(1f, 0.3f);
                wristLeftHand.DOFade(0f, 0.3f);
            }

            if (!isSilent)
            {
                WristboardManager.I.SetToDefaultTransform();
            }

            DPSettings.SaveSettingsJson();
        }
Example #3
0
        private void OnApplicationQuit()
        {
            DPSettings.SaveSettingsJson();

            OpenVR.Shutdown();

            //SteamApps.
        }
        public void Button_ResetUILocations()
        {
            DPSettings.config.wristPos      = new Vector3(-0.05f, 0.09f, -0.21f);
            DPSettings.config.wristRot      = new Vector3(165.7f, -63.7f, 29.5f);
            DPSettings.config.wristHandLeft = true;

            DPSettings.SaveSettingsJson();

            WristboardManager.I.ReloadTransform();
        }
        public void SetSnapPointsResizeWindows(bool enable)
        {
            if (!isSilent)
            {
                DPSettings.config.snapPointsResize = enable;
                DPSettings.SaveSettingsJson();
            }

            if (isSilent)
            {
                snapPointsResize.SetIsOnWithoutNotify(enable);
            }
        }
        public void SetSnapPointsEnabled(bool enable)
        {
            if (!isSilent)
            {
                DPSettings.config.snapPointsEnabled = enable;
                DPSettings.SaveSettingsJson();
            }

            if (isSilent)
            {
                enableSnapPoints.SetIsOnWithoutNotify(enable);
            }
        }
        public void SetAutoCurveDrag(bool yes)
        {
            if (!isSilent)
            {
                DPSettings.config.autoCurveDragging = yes;
                DPSettings.SaveSettingsJson();
            }

            if (isSilent)
            {
                autoCurveDrag.SetIsOnWithoutNotify(yes);
            }
        }
        public void SetReturnFocusBarClosed(bool enable)
        {
            if (!isSilent)
            {
                DPSettings.config.focusGameWhenNotInteracting = enable;
                //TODO: Fix return focus
                //DPRenderWindowOverlay.RefreshAllWindows();
                DPSettings.SaveSettingsJson();
            }

            if (isSilent)
            {
                returnFocusBarClosed.SetIsOnWithoutNotify(enable);
            }
        }
        public void SetUseDDA(bool enable)
        {
            if (!isSilent)
            {
                DPSettings.config.useDDA = enable;
                //TODO: Refresh windows
                //DPRenderWindowOverlay.RefreshAllWindows();

                DPSettings.SaveSettingsJson();
            }

            if (isSilent)
            {
                useDDA.SetIsOnWithoutNotify(enable);
            }
        }
        public void SetDragModeBlend(bool yes)
        {
            if (!yes)
            {
                return;
            }

            if (!isSilent)
            {
                DPSettings.config.dragMode = DPDragMode.BlendHMDHand;
                DPSettings.SaveSettingsJson();
            }

            dragGroup.SetAllTogglesOff();

            dragBlend.SetIsOnWithoutNotify(true);
        }
        public void SaveLoaded()
        {
            if (!loaded)
            {
                return;
            }

            DPSettings.config.startMenu.apps.Clear();

            foreach (AppIcon appIcon in apps)
            {
                StartMenuAppSer appSer = new StartMenuAppSer()
                {
                    appKey      = appIcon.appKey,
                    appTitle    = appIcon.text.text,
                    filePath    = appIcon.filePath,
                    isCustomApp = appIcon.isCustomApp,
                    isFavorite  = appIcon.isFavorite
                };
                DPSettings.config.startMenu.apps.Add(appSer);
            }

            DPSettings.SaveSettingsJson();
        }
Example #12
0
 public void Button_Save()
 {
     DPSettings.SaveSettingsJson();
 }