Esempio n. 1
0
        private void OnGUI()
        {
            titleContent = new GUIContent(EditorDrawUtility.DrawIcon(IconName.SETTINGS))
            {
                text = " Mighty Settings"
            };

            minSize = new Vector2(300, 120);

            GUILayout.Space(10);
            MightySettingsServices.Activated = EditorGUILayout.Toggle("Activated", MightySettingsServices.Activated);

            GUILayout.Space(10);
            MightySettingsServices.AutoValuesOnPlay =
                EditorGUILayout.Toggle("Auto Values On Play", MightySettingsServices.AutoValuesOnPlay);

            GUILayout.Space(10);
            MightySettingsServices.AutoValuesOnPlay =
                EditorGUILayout.Toggle("Auto Values On Build", MightySettingsServices.AutoValuesOnBuild);

            GUILayout.Space(10);
            if (GUILayout.Button("Apply Auto Values"))
            {
                MightyAutoValues.ApplyAutoValuesAsync();
            }
        }
        private void OnGUI()
        {
            titleContent = new GUIContent(EditorDrawUtility.DrawIcon(IconName.SETTINGS))
            {
                text = " Mighty Settings"
            };

            minSize = new Vector2(350, 235);

            GUILayout.Space(10);
            MightySettingsServices.Activated = EditorGUILayout.Toggle("Activated", MightySettingsServices.Activated);

            GUILayout.Space(10);
            DarkBox.BeginDrawGroup();
            MightySettingsServices.AutoValuesOnPlay =
                EditorGUILayout.Toggle("Auto Values On Play", MightySettingsServices.AutoValuesOnPlay);

            GUILayout.Space(5);
            MightySettingsServices.AutoValuesOnPlay =
                EditorGUILayout.Toggle("Auto Values On Build", MightySettingsServices.AutoValuesOnBuild);

            GUILayout.Space(5);
            if (GUILayout.Button("Apply Auto Values"))
            {
                MightyAutoValues.ApplyAutoValuesAsync();
            }
            DarkBox.EndDrawGroup();

            GUILayout.Space(10);
            DarkBox.BeginDrawGroup();
            MightySettingsServices.MainAssemblyName =
                EditorGUILayout.TextField("Main Assembly Name", MightySettingsServices.MainAssemblyName);

            GUILayout.Space(5);
            MightySettingsServices.PluginsAssemblyName =
                EditorGUILayout.TextField("Plugins Assembly Name", MightySettingsServices.PluginsAssemblyName);

            GUILayout.Space(5);
            if (GUILayout.Button("Default Name"))
            {
                MightySettingsServices.MainAssemblyName    = MightySettingsServices.DEFAULT_MAIN_ASSEMBLY_NAME;
                MightySettingsServices.PluginsAssemblyName = MightySettingsServices.DEFAULT_PLUGINS_ASSEMBLY_NAME;
            }

            DarkBox.EndDrawGroup();

            GUILayout.Space(10);
            if (GUILayout.Button("Apply Script Reload"))
            {
                MightyReloadScript.OnReloadScript();
            }
        }
Esempio n. 3
0
        private static void DrawAutoValues()
        {
            BeginBox("Auto Value Attributes");

            DrawLabelWidth(TOGGLE_LABEL_WIDTH, () =>
            {
                Space();
                MightySettingsServices.AutoValuesOnReloadScripts =
                    EditorGUILayout.Toggle("Apply On Reload Scripts", MightySettingsServices.AutoValuesOnReloadScripts);

                EditorGUI.BeginChangeCheck();

                Space();
                MightySettingsServices.AutoValuesOnPlay =
                    EditorGUILayout.Toggle("Apply On Enter Play Mode", MightySettingsServices.AutoValuesOnPlay);

                if (EditorGUI.EndChangeCheck())
                {
                    MightyAutoValues.ManageAutoValuesEvent();
                }

                Space();
                MightySettingsServices.AutoValuesOnBuild =
                    EditorGUILayout.Toggle("Apply On Build", MightySettingsServices.AutoValuesOnBuild);

                EditorGUI.BeginDisabledGroup(!MightySettingsServices.AnyAutoValues);

                Space();
                MightySettingsServices.DisplayAutoValuesLogs =
                    EditorGUILayout.Toggle("Display Logs", MightySettingsServices.DisplayAutoValuesLogs);

                EditorGUI.EndDisabledGroup();

                Space();
                if (Button("Apply Auto Values"))
                {
                    MightyAutoValues.ApplyAutoValuesAsync();
                }
            });

            EndBox();
        }