private void ShowStruct(GffStruct gff, TreeNodeCollection nodes) { foreach (string name in gff.FieldNames) { object value = gff [name]; if (value is List <GffStruct> ) { List <GffStruct> list = (List <GffStruct>)value; TreeNode node = nodes.Add(name); for (int i = 0; i < list.Count; i++) { TreeNode structNode = node.Nodes.Add(i.ToString()); ShowStruct(list [i], structNode.Nodes); } } else if (value is TalkRef) { TalkRef talkRef = (TalkRef)value; nodes.Add(name + "=\"" + _game.TalkFile[talkRef.Index] + "\""); } else { nodes.Add(name + "=" + value); } } }
private TalkRef GetTalkRef() { TalkRef talkRef = null; if (_syncStruct.HasField(TEXT)) { talkRef = (TalkRef)_syncStruct [TEXT]; } else if (_mainStruct.HasField(TEXT)) { talkRef = (TalkRef)_mainStruct [TEXT]; } return(talkRef); }
public string GetTalkText(TalkRef talkRef) { return("\"" + _game.TalkFile[talkRef.Index] + "\""); }