public void createQuote() { List <Control> prevSelected = new List <Control>(selectedNodes); deselectAll(); prevSelected.ForEach( c => { DialoguePath path = (c is NodeDialogue) ? path = ((NodeDialogue)c).path : path = ((Node)c).data.path; int index = (c is NodeQuote) ? ((NodeQuote)c).quote.Index : -1; NodeQuote node = Managers.Node.createNodeQuote(path, index); node.Editing = true; select(node, true); } ); if (prevSelected.Count == 0) { //If nothing is selected, make a new dialogue path //(which will auto-create a new quote too) createDialoguePath(); } }
public void receiveInfoDump(DialoguePath path, string[] textArray) { NodeQuote lastNode = Managers.Node.createNodes(path, textArray); lastNode.Editing = true; select(lastNode); }
public DialoguePath createDialoguePath() { //Create a new quote with no path, //which will auto-create a new path with a new quote NodeQuote node = Managers.Node.createNodeQuote(); node.Editing = true; select(node); return(node.quote.path); }
public void enterPressed() { NodeQuote activeNode = (NodeQuote)selectedNodes.FirstOrDefault( c => c is NodeQuote ); if (activeNode != null) { activeNode.Editing = false; //If it's the last in the path, DialoguePath path = activeNode.quote.path; if (activeNode.quote.Index == path.quotes.Count - 1) { //Add new node at the end NodeQuote newNode = Managers.Node.createNodeQuote(path); newNode.Editing = true; select(newNode); } } }
private void frmMain_FormClosing(object sender, FormClosingEventArgs e) { Managers.File.saveFile(); Managers.File.savePropertiesBeforeClose(); NodeQuote.disposeDialogs(); }