void OpenedItem() { this.changelog = ""; this.stagedContent = new FolderModContent(CurrentItemStagingPath()); FindModContent(); }
bool ConnectToSteam() { bool ok = InitializeSteamworks(); Debug.Log("Steamworks started? " + ok); if (ok) { this.steamworks.OnStateChanged = Repaint; this.steamworks.OnCreateItemDone = OnCreateItemDone; this.steamworks.OnSubmitItemDone = OnSubmitItemDone; this.steamworks.OnItemInfoQueryDone = OnItemInfoQueryDone; this.exportedContent = new FolderModContent(ExportPath()); FindLocalItems(); } return(ok); }
void DisplayModContent(FolderModContent content, string title, DelContentClicked OnContentClicked) { EditorGUILayout.BeginVertical(); EditorGUILayout.LabelField(title); content.scroll = EditorGUILayout.BeginScrollView(content.scroll, false, false, GUILayout.Height(200)); EditorGUILayout.BeginVertical(GUI.skin.textField); if (content.IsEmpty()) { GUILayout.Label("- Empty -"); } else { foreach (FileInfo file in content.allContent) { string label = file.Name; if (content.IsMarkedAsUpdated(file)) { label = "UPDATED: " + file.Name; } if (GUILayout.Button(label, GUI.skin.label)) { OnContentClicked(file); } } } EditorGUILayout.EndVertical(); EditorGUILayout.EndScrollView(); EditorGUILayout.EndVertical(); }