private void CreateResetButton() { if (GUILayout.Button("Reset")) { DefineSymbolEditor.Initialize(); } }
private void CreateSaveButton() { if (GUILayout.Button("Save")) { DefineSymbolEditor.Save(); } }
private void CreateScriptingDefineSymbols() { GUILayout.Space(20); EditorGUILayout.LabelField("Current Scripting Define Symbols"); EditorGUILayout.HelpBox(PlayerSettings.GetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup), MessageType.None); GUILayout.Space(20); EditorGUILayout.LabelField("New Scripting Define Symbols"); EditorGUILayout.HelpBox(DefineSymbolEditor.GetResult(), MessageType.None); }
private void CreateSymbolMenuParts(DefineSymbol symbol, int symbolIndex) { EditorGUILayout.BeginVertical(symbol.Enable ? GUI.skin.button : GUI.skin.textField); { EditorGUI.BeginChangeCheck(); var isEnabled = symbol.Enable; EditorGUILayout.BeginHorizontal(); { EditorGUI.BeginChangeCheck(); EditorGUILayout.LabelField("Enabled", GUILayout.Width(80)); isEnabled = EditorGUILayout.Toggle(isEnabled, GUILayout.Width(15)); if (symbolIndex < DefineSymbolEditor.DefineSymbols.Count) { GUILayout.FlexibleSpace(); if (GUILayout.Button("X", GUILayout.Width(20), GUILayout.Height(14))) { DefineSymbolEditor.Delete(symbolIndex); return; } } } EditorGUILayout.EndHorizontal(); var key = symbol.Key; EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Key", GUILayout.Width(80)); key = GUILayout.TextField(key); } EditorGUILayout.EndHorizontal(); var description = symbol.Description; EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Description", GUILayout.Width(80)); description = GUILayout.TextField(description); } EditorGUILayout.EndHorizontal(); if (EditorGUI.EndChangeCheck()) { DefineSymbolEditor.UpdateDefineSymbol(symbolIndex, key, description, isEnabled); } } EditorGUILayout.EndVertical(); }
private void OnFocus() { DefineSymbolEditor.Initialize(); }