public static void DisplayGitInfoWithCommand(GitLinkOnDisk gitDirectory, ref bool displayInfo, ref bool displayAdvance) { if (displayInfo = EditorGUILayout.Foldout(displayInfo, "Git: " + gitDirectory.GetName())) { DisplayGitLink(gitDirectory); if (displayAdvance = EditorGUILayout.Foldout(displayAdvance, " Git Commands")) { DisplayGitCommands(gitDirectory); } } }
public static void DrawEditorDefaultInterface(ReadMeFileStream readme, ref GitLinkOnDisk gitLink, ref string readMeText, ref bool hide) { hide = EditorGUILayout.Foldout(hide, hide ? "→ Read Me" : "↓ Read Me", EditorStyles.boldLabel); if (!hide) { GUILayout.Label("Read Me:", EditorStyles.boldLabel); GUILayout.Label("Linked git:" + (gitLink == null?"None":gitLink.GetName()), EditorStyles.boldLabel);; readMeText = EditorGUILayout.TextArea(readMeText, GUILayout.MinHeight(100)); GUILayout.BeginHorizontal(); if (GUILayout.Button("Create Default")) { if (gitLink != null) { readme.Create(ReadMeUtility.CreateBasicDefaultOnFrom(gitLink)); } else { readme.Create("# Read Me \n Hey buddy! \nWhat 's up ?"); } readMeText = readme.Get(); } if (GUILayout.Button("Load")) { readMeText = readme.Get(); } if (GUILayout.Button("Override")) { readme.Set(readMeText); } if (GUILayout.Button("Open")) { readme.Open(); } GUILayout.EndHorizontal(); } }