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();
        }
        private void OnApplicationQuit()
        {
            DPSettings.config.wristPos = _wristOverlay.transform.localPosition;
            DPSettings.config.wristRot = _wristOverlay.transform.localEulerAngles;

            DPSettings.SaveSettingsJson();
        }
        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 SetAutoCurveDrag(bool yes)
        {
            if (!isSilent)
            {
                DPSettings.config.autoCurveDragging = yes;
                DPSettings.SaveSettingsJson();
            }

            if (isSilent)
            {
                autoCurveDrag.SetIsOnWithoutNotify(yes);
            }
        }
        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);
            }
        }
        private void Start()
        {
            I = this;


            DPSettings.OnLoad(() => {
                //TODO: Renable
                // LoadApps(true);
            });



            AppIcon.appSelectEvent += LaunchAppIcon;
        }
        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);
        }
Beispiel #12
0
        private void Start()
        {
            OverlayManager.onInitialized += OnOverlaysInitialized;


            StartCoroutine(LoadBuiltInApps());


            SteamVRManager.I.onHeadsetStateChanged.AddListener(OnHeadsetStateChanged);

            blackoutDP.onInitialized += delegate { blackoutDP.SetOverlayTransform(new Vector3(0f, 0f, 0.13f), Vector3.zero, true, true); };

            closeDP.onInteractedWith += delegate(bool b) {
                if (b)
                {
                    closeDP.TransitionOverlayWidth(0.07f, 0.3f);
                }
                else
                {
                    closeDP.TransitionOverlayWidth(0.065f, 0.2f);
                }
            };

            DPSettings.OnLoad((() => {
                SetBlackoutOpacity(DPSettings.config.dimGameAmount);
            }));

            gameArtDP.onInteractedWith += delegate(bool b) {
                CUIManager.Animate(gameHoverGroup, b);

                if (b)
                {
                    gameArtDP.TransitionOverlayWidth(0.205f, 0.2f);
                }
                else
                {
                    gameArtDP.TransitionOverlayWidth(0.2f, 0.1f);
                }
            };

            WindowListButton.onPress     += LaunchAppToMainSnap;
            WindowListButton.onHeldClose += CloseApp;


            LoadAllSnapPoints();
        }
Beispiel #13
0
        //UnityEvent<RectTransform> ytay = new


        //[ShowInInspector] public BetterEvent<string> testEvent = new BetterEvent<string>();


        protected override void Start()
        {
            base.Start();


            //testEvent.Invoke("yay");


            bool isElevated = UACHelper.IsProcessElevated;

            adminText.SetText("ADMIN: " + isElevated.ToString());

            enableAdminMsg.gameObject.SetActive(!isElevated);



#if !UNITY_EDITOR
            DPSettings.OnLoad(SetupWelcomeScreen);
#endif
        }
Beispiel #14
0
    private void Init()
    {
        try {
            SteamClient.Init(appID);
            isConnected = true;
        }
        catch (System.Exception e) {
            // Couldn't init for some reason (steam is closed etc)
            Debug.Log("Could not connect to steamworks: " + e);
        }

        var q = Steamworks.Ugc.Query.All
                .WithTag("Fun")
                .WithTag("Movie")
                .MatchAllTags();

        //var result = await q.GetPageAsync( 1 );

        /*foreach ( Steamworks.Ugc.Item entry in result.Value.Entries )
         * {
         *      Console.WriteLine( $" {entry.Owner.Name}" );
         * }*/


        SteamFinder.FindSteam();


        DPSettings.OnLoad(delegate {
            if (DPSettings.config.overrideOverlayRenderQuality)
            {
                ToggleRigidLoops(true);
            }
        });


        //if (enableRigidLoops) ToggleRigidLoops(enableRigidLoops);

        GetAvatar();
    }
        private void Start()
        {
            I = this;

            DPSettings.LoadConfigJson();
            //StartCoroutine(DPSettings.AutoSave());

            DPSettings.OnLoad(HandleMinimizeAtStartup);


            //	TemplateWindowItem.selectedEvent += delegate(UwcWindow window) { NewDPWindowOverlay(window); };
            WindowSelectListElement.onPressed += delegate(WindowSelectListElement element) {
                DPDesktopOverlay desktopDP;

                if (!element.isDesktop)
                {
                    desktopDP = NewDPWindowOverlay(element.window);
                }

                else
                {
                    desktopDP = NewDPMonitorOverlay(element.monitor);
                }

                TheBarManager.I.LaunchAppToMainSnap(desktopDP.dpAppParent.appKey);
            };


            //SteamVRManager.I.onSteamVRConnected.AddListener(LoadDefaultLayout);

            //StartCoroutine(HandleOverlayRendering());

            StartCoroutine(DPOverlayBase.HandleRendering());



            TouchInjector.InitializeTouchInjection();
        }
        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();
        }
Beispiel #17
0
    private void Start()
    {
        DPSettings.OnLoad((() => {
            if (DPSettings.config.isFirstTime)
            {
                DPSettings.config.isFirstTime = false;
                CUIManager.Animate(firstGroup, true);
            }
        }));

        version.SetText("ver." + Application.version + "");

        SteamVRManager.I.onHeadsetStateChanged.AddListener(OnHeadsetStateChanged);


        /*
         * dpMain.overlay.visibilityUpdatedEvent += b => {
         *      CalculateShouldBeActive();
         * };
         */


        StartCoroutine(LoopCheckShouldBeActive());
    }
Beispiel #18
0
 public void Button_Save()
 {
     DPSettings.SaveSettingsJson();
 }