Ejemplo n.º 1
0
    public static DialogDetail ConversionFromXML(XmlNode node)
    {
        DialogDetail dialog = new DialogDetail();

        dialog.m_dialog = node.Attributes["text"].Value;
        return(dialog);
    }
Ejemplo n.º 2
0
        protected override void OnLoad(ConfigNode configNode)
        {
            foreach (ConfigNode child in configNode.GetNodes("DIALOG_BOX"))
            {
                DialogDetail detail = new DialogDetail();
                detail.OnLoad(child);

                details.Add(detail);
            }
        }
Ejemplo n.º 3
0
 public DialogBox(List <DialogDetail> srcDetails)
 {
     // Need to do a deep copy to support expresssion.  Rather than properly doing a copy
     // constructor, be lazy and serialize it.
     details = new List <DialogDetail>();
     foreach (DialogDetail srcDetail in srcDetails)
     {
         DialogDetail detail = new DialogDetail();
         ConfigNode   dummy  = new ConfigNode("DUMMY");
         srcDetail.OnSave(dummy);
         detail.OnLoad(dummy);
         details.Add(detail);
     }
 }
Ejemplo n.º 4
0
 public DialogBox(List<DialogDetail> srcDetails)
 {
     // Need to do a deep copy to support expresssion.  Rather than properly doing a copy
     // constructor, be lazy and serialize it.
     details = new List<DialogDetail>();
     foreach (DialogDetail srcDetail in srcDetails)
     {
         DialogDetail detail = new DialogDetail();
         ConfigNode dummy = new ConfigNode("DUMMY");
         srcDetail.OnSave(dummy);
         detail.OnLoad(dummy);
         details.Add(detail);
     }
 }
Ejemplo n.º 5
0
    public ActionType GetCurrentDialog(out DialogDetail dialog, out SelectionDetail selection)
    {
        dialog    = null;
        selection = null;
        if (m_currentCollection != null && m_currentCollection.m_actions != null &&
            m_currentCollectionDialogID < m_currentCollection.m_actions.Count)
        {
            ActionNode action = m_currentCollection.m_actions[m_currentCollectionDialogID];
            switch (action.m_Type)
            {
            case "dialog":
                dialog = DialogDetail.ConversionFromXML(action.m_Detail);
                return(ActionType.Dialog);

            case "selection":
                selection = SelectionDetail.ConversionFromXML(action.m_Detail);
                return(ActionType.Selection);
            }
        }

        return(ActionType.None);
    }
Ejemplo n.º 6
0
 public ActionType GetCurrentDialog(out DialogDetail dialog, out SelectionDetail selection)
 {
     return(m_dialog.GetCurrentDialog(out dialog, out selection));
 }
Ejemplo n.º 7
0
        protected override void OnLoad(ConfigNode configNode)
        {
            foreach (ConfigNode child in configNode.GetNodes("DIALOG_BOX"))
            {
                DialogDetail detail = new DialogDetail();
                detail.OnLoad(child);

                details.Add(detail);
            }
        }