public void AddNewDialogue() { Dirty = true; HashSet <string> dlgNames = new HashSet <string>(); foreach (var dlg in DlgModel.DlgItems) { dlgNames.Add(dlg.Name); } string baseName = "Dialogue "; int curIndex = 1; while (true) { string name = baseName + curIndex; if (!dlgNames.Contains(name)) { DlgModel.Add(name); break; } ++curIndex; } }
public void RemoveItem(string itemName) { DlgModel.Remove(itemName); }
public void OpenDialogue(string dialogueName) { DlgModel.OpenDialogue(dialogueName); }
/// <summary> /// Create a node and add it to the view-model. /// </summary> public NodeViewModel CreateNode(string name, Point nodeLocation) { return(DlgModel.CreateNode(name, nodeLocation)); }