Beispiel #1
0
        private void InstallScreen()
        {
            EditorGUILayout.Space();

            EditorGUILayout.LabelField("Options", SCPE_GUI.Header);

            EditorGUILayout.Space();

            using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
            {
                using (new EditorGUILayout.HorizontalScope())
                {
                    using (new EditorGUI.DisabledGroupScope(Installer.Demo.HAS_SCENE_PACKAGE == false))
                    {
                        //EditorGUILayout.LabelField("Install demo content");

                        Installer.Settings.installDemoContent = SCPE_GUI.BoolSwitchGUI.Draw(Installer.Settings.installDemoContent, "Demo scenes");
                        //Installer.Settings.installDemoContent = EditorGUILayout.Toggle(Installer.Settings.installDemoContent);
                    }

                    //When installed
                    if (Installer.Demo.SCENES_INSTALLED)
                    {
                        SCPE_GUI.DrawStatusBox(null, "Installed", SCPE_GUI.Status.Ok, false);
                    }
                    //Not installed and missing source
                    if (!Installer.Demo.SCENES_INSTALLED)
                    {
                        if (Installer.Demo.HAS_SCENE_PACKAGE == false)
                        {
                            SCPE_GUI.DrawStatusBox(null, "Missing", SCPE_GUI.Status.Warning, false);
                        }
                    }
                }
            }
            using (new EditorGUILayout.HorizontalScope())
            {
                if (Installer.Demo.HAS_SCENE_PACKAGE == true)
                {
                    EditorGUILayout.LabelField("Examples showing volume blending", EditorStyles.miniLabel);
                }
                if (Installer.Demo.HAS_SCENE_PACKAGE == false && Installer.Demo.SCENES_INSTALLED == false)
                {
                    EditorGUILayout.HelpBox("Also import the \"_DemoContents.unitypackage\" file to install.", MessageType.None);
                }
            }

            using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
            {
                using (new EditorGUILayout.HorizontalScope())
                {
                    using (new EditorGUI.DisabledGroupScope(Installer.Demo.HAS_SAMPLES_PACKAGE == false))
                    {
                        //EditorGUILayout.LabelField("Install demo content");

                        Installer.Settings.installSampleContent = SCPE_GUI.BoolSwitchGUI.Draw(Installer.Settings.installSampleContent, "Sample content");

                        if (Installer.Settings.installDemoContent)
                        {
                            Installer.Settings.installSampleContent = true;
                        }
                        //Installer.Settings.installDemoContent = EditorGUILayout.Toggle(Installer.Settings.installDemoContent);
                    }

                    //When installed
                    if (Installer.Demo.SAMPLES_INSTALLED)
                    {
                        SCPE_GUI.DrawStatusBox(null, "Installed", SCPE_GUI.Status.Ok, false);
                    }
                    //Not installed and missing source
                    if (!Installer.Demo.SAMPLES_INSTALLED)
                    {
                        if (Installer.Demo.HAS_SAMPLES_PACKAGE == false)
                        {
                            SCPE_GUI.DrawStatusBox(null, "Missing", SCPE_GUI.Status.Warning, false);
                        }
                    }
                }
            }
            using (new EditorGUILayout.HorizontalScope())
            {
                if (Installer.Demo.HAS_SCENE_PACKAGE == true)
                {
                    EditorGUILayout.LabelField("Profiles and sample textures", EditorStyles.miniLabel);
                }
                if (Installer.Demo.HAS_SCENE_PACKAGE == false && Installer.Demo.SCENES_INSTALLED == false)
                {
                    EditorGUILayout.HelpBox("Also import the \"_Samples.unitypackage\" file to install.", MessageType.None);
                }
            }


            if (Installer.CURRENTLY_INSTALLING || Installer.IS_INSTALLED)
            {
                EditorGUILayout.Space();

                EditorGUILayout.LabelField("Log", SCPE_GUI.Header);

                EditorGUILayout.Space();
                using (new EditorGUILayout.VerticalScope(EditorStyles.textArea, UnityEngine.GUILayout.MaxHeight(150f)))
                {
                    scrollPos = EditorGUILayout.BeginScrollView(scrollPos);

                    for (int i = 0; i < Installer.Log.NumItems; i++)
                    {
                        SCPE_GUI.DrawLogLine(Installer.Log.Read(i));
                    }

                    if (Installer.CURRENTLY_INSTALLING)
                    {
                        scrollPos.y += 10f;
                    }

                    EditorGUILayout.EndScrollView();
                }

                if (Installer.IS_INSTALLED)
                {
                    //EditorGUILayout.HelpBox("Shaders have been configured for use with the " + PostProcessingInstallation.Config + " installation of the Post Processing Stack. You can reconfigure them through the Help window,", MessageType.None);
                }
            }
        }