Exemple #1
0
        private void MoveLink(object obj)
        {
            string command = obj as string;

            int n = 1;

            if (command == "Up") //"Up" is down in index
            {
                n = -1;
            }
            int movelinkID = datagrid_Links.SelectedIndex;
            int swapNodeID = movelinkID + n;

            if ((movelinkID == 0 && command == "Up") || (movelinkID >= linkTable.Count - 1 && command == "Down"))
            {
                return;
            }

            ReplyChoiceNode moveNode = linkTable[movelinkID];
            ReplyChoiceNode swapNode = linkTable[swapNodeID];
            int             swapto   = moveNode.Order;

            moveNode.Order = swapNode.Order;
            swapNode.Order = swapto;
            NeedsSave      = true;
            ReOrderTable();
        }
Exemple #2
0
        private void ParseLink(ReplyChoiceNode link)
        {
            string a      = "E";
            int    tgtUID = link.Index;

            if (!IsReply)
            {
                a       = "R";
                tgtUID += 1000;
            }
            link.NodeIDLink = $"{a}{link.Index}";

            link.ReplyLine = GlobalFindStrRefbyID(link.ReplyStrRef, ParentWindow.Pcc);

            var tgtObj  = ParentWindow.CurrentObjects.First(t => t.NodeUID == tgtUID);
            var tgtNode = (DiagNode)tgtObj;

            link.TgtFireCnd = "Conditional";
            if (!tgtNode.Node.FiresConditional)
            {
                link.TgtFireCnd = "Bool";
            }

            link.TgtCondition = tgtNode.Node.ConditionalOrBool;
            link.TgtLine      = tgtNode.Node.Line;
            link.Ordinal      = DialogueEditorWPF.AddOrdinal(link.Order + 1);
            link.TgtSpeaker   = tgtNode.Node.SpeakerTag.SpeakerName;
        }
Exemple #3
0
        private void DeleteLink()
        {
            ReplyChoiceNode result = datagrid_Links.SelectedItem as ReplyChoiceNode;

            linkTable.Remove(result);
            NeedsSave = true;
            ReOrderTable();
        }