예제 #1
0
        // -------------------
        void OnGUI()
        {
            GUILayout.Box(GUIContent.none, CFEditorStyles.Inst.headerInstaller, GUILayout.ExpandWidth(true));

            EditorGUILayout.Space();

            GUILayout.Box("Welcome to <b>Control Freak 2</b>!", CFEditorStyles.Inst.centeredTextTranspBG,
                          GUILayout.ExpandWidth(true)); //, GUILayout.ExpandHeight(true));


            EditorGUILayout.Space();

            CFGUI.BeginIndentedVertical(CFEditorStyles.Inst.transpSunkenBG);

            DrawFeatureBox(this.inputAxesPresent, "Input Axes Present!", "Input Axes are missing or are incomplete! (Click INSTALL)");
            DrawFeatureBox(this.defineSymbolsPresent, "Scripting Symbols Defined!", "Scripting Symbols are not defined for all platforms! (Click INSTALL)");

            if (CFProjPrefs.Inst.isIsntalled)
            {
                this.platformOptionList.DrawForceMobileModeButton();
            }

            CFGUI.EndIndentedVertical();

            GUILayout.FlexibleSpace();


            if (GUILayout.Button(new GUIContent("Install", "Clicking this button will:\n\n" +
                                                "* Add default CF2 scripting define symbols.\n\n" +
                                                "* Setup \'Forced Mobile Mode\' on all mobile platforms.\n\n" +
                                                "* Add CF2 Input Axes to Unity Input Manager (without removing existing axes).\n"),
                                 CFEditorStyles.Inst.installerButton))
            {
                this.Install();
                this.Close();
            }

            if (GUILayout.Button(new GUIContent("Uninstall", "Clicking this button will:\n\n" +
                                                "* Remove all CF2-related define symbols.\n\n" +
                                                "* Remove CF2 Axes from Unity Input Manager.\n"),
                                 CFEditorStyles.Inst.installerButton))
            {
                this.Uninstall();
                this.Close();
            }

            GUILayout.Space(20);

            if (GUILayout.Button(new GUIContent("Install Add-Ons..."), CFEditorStyles.Inst.installerButton))
            {
                this.ShowAddOnMenu();
            }



            GUILayout.Space(20);

            if (GUILayout.Button("View Online Documentation.", CFEditorStyles.Inst.installerButton))
            {
                Application.OpenURL(ONLINE_DOCS_URL);
            }
            if (GUILayout.Button("View Video Tutorials on YouTube.", CFEditorStyles.Inst.installerButton))
            {
                Application.OpenURL(VIDEO_TUTORIALS_URL);
            }
            if (GUILayout.Button("View Our Website.", CFEditorStyles.Inst.installerButton))
            {
                Application.OpenURL(WEBSITE_URL);
            }
        }