public void ActivateNodeDetails() { GetPanel().SetActive(true); nodeTypeDropdown.value = 0; ToggleChoiceComponents(); displayDialogueNodeDetailsBtn.GetComponent <Button>().interactable = false; //indicate to user that button no longer functions. if (editing) { print((dialogueNodesListUI.GetSelectedItemFromGroup(dialogueNodesListUI.SelectedNode) as DialogueNode)); string[] nodeDesc = DbCommands.GetTupleFromTable("DialogueNodes", "NodeIDs = " + (dialogueNodesListUI.GetSelectedItemFromGroup(dialogueNodesListUI.SelectedNode) as DialogueNode).GetComponent <DialogueNode>().MyID); inputNodeText.text = nodeDesc[1]; bool endDialogueOptionBool = false; if (nodeDesc[5] != "") { endDialogueOptionBool = (int.Parse(nodeDesc[5]) == 1) ? true : false; } endDialogueOptionToggle.isOn = endDialogueOptionBool; SetOverrideBtnTxt(nodeDesc[3], nodeDesc[4]); } else { ClearEditNodeDetails(); } }
public void DisplayChoicesRelatedToNode() { GetPanel().SetActive(true); DialogueNode currentDialogueNode = (dialogueNodesListUI.GetSelectedItemFromGroup(dialogueNodesListUI.SelectedNode) as DialogueNode); FillDisplayFromDb(DbQueries.GetPlayerChoiceDisplayQry(currentDialogueNode.MyID), playerChoicesList.transform, BuildPlayerChoiceTextOnly); AppendDisplayFromDb(DbQueries.GetPlayerChoiceVocabDisplayQry(currentDialogueNode.MyID), playerChoicesList.transform, BuildPlayerChoiceVocab); }
public void InsertPlayerChoice(string choiceText, string choiceID) { DbCommands.InsertTupleToTable("PlayerChoices", choiceID, choiceText, (dialogueNodesListUI.GetSelectedItemFromGroup(dialogueNodesListUI.SelectedNode) as DialogueNode).MyID, null, "0"); }