public DevLogList(DevLogEntries elements, DevLogEntry.Status status) : base(elements.GetEntries(status), typeof(DevLogEntry), true, true, true, true) { allEntries = elements; validEntries = elements.GetEntries(status); this.list = elements.GetEntries(status); title = status.ToString(); }
internal static void WriteDevLog(DevLogEntries entries) { //TODO tasklog and devlog should have their own filenames if (File.Exists(GetRelativeCurrentFilePath())) { File.Delete(GetRelativeCurrentFilePath()); } StringBuilder sb = new StringBuilder(); Directory.CreateDirectory(STORAGE_DIRECTORY); if (!File.Exists(GetRelativeCurrentFilePath())) { sb.Append(GetDevLogIntro()); } sb.AppendLine("## Released Features"); sb.AppendLine(); sb.AppendLine("The following features have been tested and, to the best of our knowledge, work as intended. However, we are not perfect. Please let us know if you find a problem, like the feature or do not like a feature."); sb.AppendLine(); for (int i = 0; i < entries.GetEntries().Count; i++) { if (entries.GetEntry(i).status == DevLogEntry.Status.Done) { sb.Append(GetMarkdown(entries.GetEntry(i))); } } if (entries.GetEntries(DevLogEntry.Status.Testing).Count > 0) { sb.AppendLine("## Beta Features"); sb.AppendLine("The following features are currently being tested. They may not work as intended, please let us know if you find a problem, like the feature or do not like a feature."); sb.AppendLine(); sb.AppendLine(); for (int i = 0; i < entries.GetEntries().Count; i++) { if (entries.GetEntry(i).status == DevLogEntry.Status.Testing) { sb.Append(GetMarkdown(entries.GetEntry(i))); } } } using (StreamWriter file = File.AppendText(GetRelativeCurrentFilePath())) { file.Write(sb.ToString()); file.Close(); } }
private void Awake() { m_DevLogEntries = AssetDatabase.LoadAssetAtPath(Settings.DevLogScriptableObjectPath, typeof(DevLogEntries)) as DevLogEntries; m_DevLogPanel = new DevLogPanel(m_DevLogEntries); //TODO this needs to be done in OnEnable to avoid edge case bugs on an upgrade m_ScreenCaptures = AssetDatabase.LoadAssetAtPath(Settings.ScreenCaptureScriptableObjectPath, typeof(DevLogScreenCaptureCollection)) as DevLogScreenCaptureCollection; mediaPanel = new MediaPanel(m_ScreenCaptures); m_EntryPanel = new EntryPanel(m_DevLogEntries); m_TwitterPanel = new TwitterPanel(); m_DiscordPanel = new DiscordPanel(); m_SchedulingPanel = new SchedulingPanel(m_DevLogEntries); m_GitPanel = new GitPanel(m_EntryPanel); }
private void ConfigureReorderableDevLogLists() { if (DevLogList.isDirty || entries != lastEntriesList) { ideaList = ConfigureList(DevLogEntry.Status.Idea); todoList = ConfigureList(DevLogEntry.Status.ToDo); inProgressList = ConfigureList(DevLogEntry.Status.InProgress); testingList = ConfigureList(DevLogEntry.Status.Testing); doneList = ConfigureList(DevLogEntry.Status.Done); lastEntriesList = entries; } else if (entries == null) { doneList = null; } }
internal static void WriteTaskLog(DevLogEntries entries) { //TODO tasklog and devlog should have their own filenames if (File.Exists(GetRelativeCurrentFilePath())) { File.Delete(GetRelativeCurrentFilePath()); } StringBuilder sb = new StringBuilder(); Directory.CreateDirectory(STORAGE_DIRECTORY); if (!File.Exists(GetRelativeCurrentFilePath())) { sb.Append(GetDevLogIntro()); } sb.AppendLine("## In Progress Features"); sb.AppendLine(); for (int i = 0; i < entries.GetEntries().Count; i++) { if (entries.GetEntry(i).status == DevLogEntry.Status.InProgress) { sb.Append(GetMarkdown(entries.GetEntry(i))); } } if (entries.GetEntries(DevLogEntry.Status.ToDo).Count > 0) { sb.AppendLine("## To Do Features"); sb.AppendLine(); for (int i = 0; i < entries.GetEntries().Count; i++) { if (entries.GetEntry(i).status == DevLogEntry.Status.ToDo) { sb.Append(GetMarkdown(entries.GetEntry(i))); } } } using (StreamWriter file = File.AppendText(GetRelativeCurrentFilePath())) { file.Write(sb.ToString()); file.Close(); } }
public DevLogList(DevLogEntries elements, DevLogEntry.Status status) : base(elements.GetEntries(status), typeof(DevLogEntry), true, true, true, true) { allEntries = elements; validEntries = elements.GetEntries(status); this.list = elements.GetEntries(status); title = status.ToString(); drawElementCallback = DrawLogListElement; drawHeaderCallback = DrawHeader; elementHeightCallback = ElementHeightCallback; onReorderCallback = SaveReorderedList; onSelectCallback = OnSelect; displayAdd = false; onChangedCallback = SaveReorderedList; devLoggerWindow = EditorWindow.GetWindow(typeof(DevLoggerWindow)) as DevLoggerWindow; }
public EntryPanel(DevLogEntries entries) { this.entries = entries; }
/// <summary> /// Display the settings UI. /// </summary> public void SettingsTabUI() { string newPath; Skin.StartSection("Capture Storage", false); EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel("Captures Save Folder"); string originalPath = Settings.CaptureFileFolderPath; Settings.CaptureFileFolderPath = EditorGUILayout.TextField(Settings.CaptureFileFolderPath, GUILayout.Height(40)); if (GUILayout.Button("Browse")) { newPath = EditorUtility.OpenFolderPanel("Select a folder in which to save captures", Settings.CaptureFileFolderPath, ""); if (!string.IsNullOrEmpty(newPath)) { Settings.CaptureFileFolderPath = newPath; } } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel("File Organizaton"); EditorGUILayout.BeginVertical(); Settings.OrganizeCapturesByProject = EditorGUILayout.ToggleLeft("Organize in Project sub folders (e.g. 'root/Project')", Settings.OrganizeCapturesByProject); Settings.OrganizeCapturesByScene = EditorGUILayout.ToggleLeft("Organize in Scene sub folders (e.g. 'root/Project/Scene')", Settings.OrganizeCapturesByScene); EditorGUILayout.EndVertical(); EditorGUILayout.EndHorizontal(); Skin.EndSection(); Skin.StartSection("Capturing", false); Settings.TrimTabsWhenMaximized = EditorGUILayout.ToggleLeft("Trim tabs from the window when it is maximized", Settings.TrimTabsWhenMaximized); Settings.TrimSceneViewToolbar = EditorGUILayout.ToggleLeft("Trim the Toolbar from Scene View", Settings.TrimSceneViewToolbar); Settings.TrimGameViewToolbar = EditorGUILayout.ToggleLeft("Trim the Toolbar from Game View", Settings.TrimGameViewToolbar); Skin.EndSection(); Skin.StartSection("Dev Log Objects", false); EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel("Dev Log Storage"); string existingPath = AssetDatabase.GetAssetPath(m_DevLogEntries); m_DevLogEntries = EditorGUILayout.ObjectField(m_DevLogEntries, typeof(DevLogEntries), true) as DevLogEntries; if (m_DevLogEntries == null) { if (GUILayout.Button("Create")) { string filename = "Assets/Dev Log " + Application.version + ".asset"; m_DevLogEntries = ScriptableObject.CreateInstance <DevLogEntries>(); AssetDatabase.CreateAsset(m_DevLogEntries, filename); AssetDatabase.SaveAssets(); } } newPath = AssetDatabase.GetAssetPath(m_DevLogEntries); if (existingPath != newPath) { Settings.DevLogScriptableObjectPath = newPath; } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel("Screen Capture Storage"); existingPath = AssetDatabase.GetAssetPath(m_ScreenCaptures); m_ScreenCaptures = EditorGUILayout.ObjectField(m_ScreenCaptures, typeof(DevLogScreenCaptureCollection), true) as DevLogScreenCaptureCollection; if (m_ScreenCaptures == null) { if (GUILayout.Button("Create")) { string filename = "Assets/Screen Captures " + Application.version + ".asset"; m_ScreenCaptures = ScriptableObject.CreateInstance <DevLogScreenCaptureCollection>(); AssetDatabase.CreateAsset(m_ScreenCaptures, filename); AssetDatabase.SaveAssets(); Settings.ScreenCaptureScriptableObjectPath = filename; } } newPath = AssetDatabase.GetAssetPath(m_ScreenCaptures); if (existingPath != newPath) { Settings.ScreenCaptureScriptableObjectPath = newPath; } EditorGUILayout.EndHorizontal(); Skin.EndSection(); m_DiscordPanel.OnSettingsGUI(); m_TwitterPanel.OnSettingsGUI(); DevHelpersGUI(); EditorGUILayout.LabelField("Welcome to " + Application.productName + " v" + Application.version); Skin.EndSection(); }
public DevLogPanel(DevLogEntries entries) { this.entries = entries; devLoggerWindow = EditorWindow.GetWindow(typeof(DevLoggerWindow)) as DevLoggerWindow; }
public SchedulingPanel(DevLogEntries entries) { this.m_Entries = entries; }