コード例 #1
0
ファイル: SettingsApp.cs プロジェクト: ouarlone/DesktopPortal
        private void ShowRestartWarning(string change, Action callback)
        {
            restartWarningChange.SetText("Change: " + change);

            CUIManager.Animate(restartWarningGroup, true);
            currentRestartWarningCallback = callback;
        }
コード例 #2
0
        private void OnInteractedWith(bool interacting)
        {
            if (interacting)
            {
                foreach (WristBubble bubble in WristBubble.bubbles)
                {
                    CUIManager.Animate(bubble.cuiGroup, true);
                }
            }
            else
            {
                foreach (WristBubble bubble in WristBubble.bubbles)
                {
                    if (!bubble.isPinned)
                    {
                        CUIManager.Animate(bubble.cuiGroup, false);
                    }
                }
            }



            if (interacting)
            {
                CUIManager.SwapAnimate(songScrollerCUI, mediaControlButtonsCUI);
            }
            else
            {
                CUIManager.SwapAnimate(mediaControlButtonsCUI, songScrollerCUI);
            }
        }
コード例 #3
0
        public void Swap(CUIGroup newGroup, bool instant = false)
        {
            if (newGroup == activeGroup)
            {
                return;
            }

            if (activeGroup)
            {
                if (instant)
                {
                    CUIManager.SwapAnimate(activeGroup, newGroup, -1f, CUIAnimation.InstantOut, CUIAnimation.InstantIn);
                }
                else
                {
                    CUIManager.SwapAnimate(activeGroup, newGroup);
                }
            }
            else
            {
                if (instant)
                {
                    CUIManager.Animate(newGroup, CUIAnimation.InstantIn);
                }
                else
                {
                    CUIManager.Animate(newGroup, true);
                }
            }

            activeGroup = newGroup;
        }
コード例 #4
0
ファイル: CUIRevealer.cs プロジェクト: ouarlone/DesktopPortal
        private IEnumerator RevealAnimate(bool show = true)
        {
            foreach (var child in childrenGroups)
            {
                CUIManager.Animate(child, show);

                yield return(new WaitForSeconds(delayBetweenReveal));
            }
        }
コード例 #5
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();
        }
コード例 #6
0
        private void OnLookShowing(bool visible)
        {
            WristBubble.wristVisible = !visible;

            CUIManager.Animate(songScrollerCUI, CUIAnimation.FadeOut);

            if (!visible)
            {
                CUIManager.Animate(mediaCUI, CUIAnimation.FadeInDown, 0.5f);
                CUIManager.Animate(songScrollerCUI, CUIAnimation.FadeIn);
            }
            else
            {
                CUIManager.Animate(mediaCUI, CUIAnimation.FadeOutUp);
                CUIManager.Animate(songScrollerCUI, CUIAnimation.FadeOut);
            }
        }
コード例 #7
0
        public override bool Deactivate(bool instant = false, bool force = false)
        {
            if (!base.Deactivate(instant, force))
            {
                return(false);
            }

            bool showing = false;

            if (invertShowingHiding)
            {
                showing = true;
            }

            CUIManager.Animate(group, showing, -1f, instant);

            return(true);
        }
コード例 #8
0
        public override void OnInit()
        {
            base.OnInit();

            //StartCoroutine(LibraryHelper.I.LoadGameLibraryImages(false));
            LibraryHelper.I.PopulateDPGamesLibrary(false);

            //CUIManager.Animate(welcomeView, CUIAnimation.FadeIn);
            // activeGroup = welcomeView;

            // welcomePanel.Show();
            // gridPanel.Hide(true);


            // StartCoroutine(LoadLibraryGameImages());


            CUIManager.Animate(welcomeView, CUIAnimation.FadeIn);
            activeGroup = welcomeView;

            StartCoroutine(favoritesDispalyGroup.MakeGamesDelayed());
            //favoritesDispalyGroup./
        }
コード例 #9
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());
    }
コード例 #10
0
        private IEnumerator ShowTaskInstalledScreen()
        {
            yield return(new WaitForSeconds(10f));

            CUIManager.Animate(restartCUI, true);
        }