Ejemplo n.º 1
0
        private IEnumerator DelayedAction()
        {
            yield return(new WaitForSeconds(2f));

            UiBackground         = GameObject.Find("UserInterface/MenuContent/Backdrop/Backdrop/Background");
            QMBackground         = GameObject.Find("UserInterface/QuickMenu/QuickMenu_NewElements/_Background/Panel");
            ContextUiBackground  = GameObject.Find("UserInterface/QuickMenu/QuickMenu_NewElements/_CONTEXT/QM_Context_User_Hover/Panel");
            ContextUiBackground2 = GameObject.Find("UserInterface/QuickMenu/QuickMenu_NewElements/_CONTEXT/QM_Context_User_Selected/Panel");
            ContextUiBackground3 = GameObject.Find("UserInterface/QuickMenu/QuickMenu_NewElements/_CONTEXT/QM_Context_ToolTip/Panel");
            InfoBarBackground    = GameObject.Find("UserInterface/QuickMenu/QuickMenu_NewElements/_InfoBar/Panel");

            OriginalQMMat         = QMBackground.GetComponent <Image>().material;
            OriginalUiMat         = UiBackground.GetComponent <Image>().material;
            OriginalContextUiMat  = ContextUiBackground.GetComponent <Image>().material;
            OriginalContextUiMat2 = ContextUiBackground2.GetComponent <Image>().material;
            OriginalContextUiMat3 = ContextUiBackground3.GetComponent <Image>().material;
            OriginalInfoBarMat    = InfoBarBackground.GetComponent <Image>().material;
            yield break;
        }
Ejemplo n.º 2
0
        private IEnumerator Setup()
        {
            yield return(new WaitForSeconds(0.5f));

            if (enabled.Value)
            {
                if (altBlur.Value || VR.isPresent)
                {
                    UiBackground.GetComponent <Image>().material         = ResourceManager.BlurLite;
                    QMBackground.GetComponent <Image>().material         = ResourceManager.BlurLite;
                    ContextUiBackground.GetComponent <Image>().material  = ResourceManager.BlurLite;
                    ContextUiBackground2.GetComponent <Image>().material = ResourceManager.BlurLite;
                    ContextUiBackground3.GetComponent <Image>().material = ResourceManager.BlurLite;
                    InfoBarBackground.GetComponent <Image>().material    = ResourceManager.BlurLite;
                }
                else
                {
                    UiBackground.GetComponent <Image>().material         = ResourceManager.BlurGoBrrr;
                    QMBackground.GetComponent <Image>().material         = ResourceManager.BlurGoBrrr;
                    ContextUiBackground.GetComponent <Image>().material  = ResourceManager.BlurGoBrrr;
                    ContextUiBackground2.GetComponent <Image>().material = ResourceManager.BlurGoBrrr;
                    ContextUiBackground3.GetComponent <Image>().material = ResourceManager.BlurGoBrrr;
                    InfoBarBackground.GetComponent <Image>().material    = ResourceManager.BlurGoBrrr;
                }
            }
            else
            {
                QMBackground.GetComponent <Image>().material         = OriginalQMMat;
                UiBackground.GetComponent <Image>().material         = OriginalUiMat;
                ContextUiBackground.GetComponent <Image>().material  = OriginalContextUiMat;
                ContextUiBackground2.GetComponent <Image>().material = OriginalContextUiMat2;
                ContextUiBackground3.GetComponent <Image>().material = OriginalContextUiMat3;
                InfoBarBackground.GetComponent <Image>().material    = OriginalInfoBarMat;
            }
            yield break;
        }