void GUIGroupPopup() { MadGUI.Box("Groups", () => { EditorGUILayout.BeginHorizontal(); MadGUI.LookLikeControls(75); currentGroupIndex = EditorGUILayout.Popup("Group", currentGroupIndex, GroupNames()); MadGUI.LookLikeControls(0); if (MadGUI.Button("Edit Groups", Color.green, GUILayout.Width(100))) { MadLevelGroupsEditTool.Display(configuration); } EditorGUILayout.EndHorizontal(); EditorGUILayout.Space(); }); }
void GUIGroupPopup() { MadGUI.Box("Groups", () => { EditorGUILayout.BeginHorizontal(); MadGUI.LookLikeControls(75); currentGroupIndex = EditorGUILayout.Popup("Group", currentGroupIndex, GroupNames()); MadGUI.LookLikeControls(0); GUI.enabled = currentGroup != configuration.defaultGroup; if (MadGUI.Button("X", Color.red, GUILayout.Width(20))) { RemoveGroup(currentGroup); } if (MadGUI.Button("Rename", Color.yellow, GUILayout.Width(70))) { RenameGroup(currentGroup); } GUI.enabled = true; EditorGUILayout.EndHorizontal(); EditorGUILayout.Space(); EditorGUILayout.BeginHorizontal(); MadGUI.Indent(() => { newGroupName = EditorGUILayout.TextField("New Group", newGroupName); GUI.enabled = !string.IsNullOrEmpty(newGroupName); GUI.backgroundColor = Color.green; if (GUILayout.Button("Add", GUILayout.Width(40))) { if (AddGroup(newGroupName)) { // newGroupName = ""; } } GUI.backgroundColor = Color.white; GUI.enabled = true; }); EditorGUILayout.EndHorizontal(); }); }