public override void Reset() { xmlSource = null; xPath = new FsmXpathQuery(); nodeCount = null; xmlResult = null; foundEvent = null; notFoundEvent = null; errorEvent = null; }
public override void Reset() { xmlSource = null; xPath = null; xmlResult = null; storeReference = null; storeProperties = new FsmXmlPropertiesStorage(); storeProperties.Fsm = this.Fsm; foundEvent = null; notFoundEvent = null; errorEvent = null; }
public static bool EditFsmXpathQueryField(Fsm fsm, FsmXpathQuery target) { bool edited = false; target._foldout = FsmEditorGUILayout.BoldFoldout(target._foldout, new GUIContent("xPath Query")); if (target.xPathQuery == null) { target.xPathQuery = new FsmString(); } if (target._foldout) { #if PLAYMAKER_1_8_OR_NEWER PlayMakerInspectorUtils.SetActionEditorVariableSelectionContext(target, target.GetType().GetField("xPathQuery")); #endif target.xPathQuery = VariableEditor.FsmStringField(new GUIContent("xPath Query"), fsm, target.xPathQuery, null); } if (string.IsNullOrEmpty(target.xPathQuery.Value)) { } else { if (target.xPathVariables == null || target.xPathVariables.Length == 0) { if (!target._foldout) { EditorGUILayout.LabelField("xPath Query", target.xPathQuery.Value); } } else { EditorGUILayout.LabelField("xPath Query parsed", target.ParseXpathQuery(fsm)); } } if (target._foldout) { edited = edited || EditFsmXpathQueryVariablesProperties(fsm, target); } return(edited); }
public override void Reset() { xmlSource = null; xPath = null; xmlResult = null; storeReference = null; storeProperties = null; storeNodeProperties = null; found = null; foundEvent = null; notFoundEvent = null; errorEvent = null; }
public static bool EditFsmXpathQueryField(Fsm fsm, FsmXpathQuery target) { bool edited = false; target._foldout = FsmEditorGUILayout.BoldFoldout(target._foldout, new GUIContent("xPath Query")); if (target.xPathQuery == null) { target.xPathQuery = new FsmString(); } if (target._foldout) { target.xPathQuery = VariableEditor.FsmStringField(new GUIContent("xPath Query"), fsm, target.xPathQuery, null); } if (string.IsNullOrEmpty(target.xPathQuery.Value)) { } else { if (target.xPathVariables == null || target.xPathVariables.Length == 0) { if (!target._foldout) { EditorGUILayout.LabelField("xPath Query", target.xPathQuery.Value); } } else { EditorGUILayout.LabelField("xPath Query parsed", target.ParseXpathQuery(fsm)); } } if (target._foldout) { edited = edited || EditFsmXpathQueryVariablesProperties(fsm, target); } return(edited); }
public static bool EditFsmXpathQueryField(Fsm fsm,FsmXpathQuery target) { bool edited =false; target._foldout = FsmEditorGUILayout.BoldFoldout(target._foldout,new GUIContent("xPath Query")); if (target.xPathQuery==null) { target.xPathQuery = new FsmString(); } if (target._foldout) { target.xPathQuery = VariableEditor.FsmStringField(new GUIContent("xPath Query"),fsm,target.xPathQuery,null); } if (string.IsNullOrEmpty(target.xPathQuery.Value)) { }else{ if (target.xPathVariables==null || target.xPathVariables.Length==0) { if (!target._foldout) { EditorGUILayout.LabelField("xPath Query",target.xPathQuery.Value); } }else{ EditorGUILayout.LabelField("xPath Query parsed",target.ParseXpathQuery(fsm)); } } if (target._foldout) { edited = edited || EditFsmXpathQueryVariablesProperties(fsm,target); } return edited; }
public static bool EditFsmXpathQueryVariablesProperties(Fsm fsm,FsmXpathQuery target) { if (target==null) { target = new FsmXpathQuery(); } bool edited = false; int count = 0; if (target.xPathVariables !=null) { count = target.xPathVariables.Length; for(int i=0;i<count;i++) { GUILayout.BeginHorizontal(); bool fsmVariableChangedFlag; target.xPathVariables[i] = PlayMakerInspectorUtils.EditorGUILayout_FsmVarPopup("Variable _"+i+"_",fsm.Variables.GetAllNamedVariables(),target.xPathVariables[i],out fsmVariableChangedFlag); // PlayMaker api is now not working on 1.8 and shoudl become private //target.xPathVariables[i] = VariableEditor.FsmVarPopup(new GUIContent("Variable _"+i+"_"),fsm,target.xPathVariables[i]); edited = edited || fsmVariableChangedFlag; if (i+1==count) { if (FsmEditorGUILayout.DeleteButton()) { ArrayUtility.RemoveAt(ref target.xPathVariables,i); return true; // we must not continue, an entry is going to be deleted so the loop is broken here. next OnGui, all will be well. } }else{ GUILayout.Space(21); } GUILayout.EndHorizontal(); } } string _addButtonLabel = "Add a variable"; if (count>0) { _addButtonLabel = "Add another variable"; } GUILayout.BeginHorizontal(); GUILayout.Space(154); if ( GUILayout.Button(_addButtonLabel) ) { if (target.xPathVariables==null) { target.xPathVariables = new FsmVar[0]; } ArrayUtility.Add<FsmVar>(ref target.xPathVariables, new FsmVar()); edited = true; } GUILayout.Space(21); GUILayout.EndHorizontal(); return edited || GUI.changed; }
public static bool EditFsmXpathQueryVariablesProperties(Fsm fsm, FsmXpathQuery target) { if (target == null) { target = new FsmXpathQuery(); } bool edited = false; int count = 0; if (target.xPathVariables != null) { count = target.xPathVariables.Length; for (int i = 0; i < count; i++) { GUILayout.BeginHorizontal(); bool fsmVariableChangedFlag; target.xPathVariables[i] = PlayMakerInspectorUtils.EditorGUILayout_FsmVarPopup("Variable _" + i + "_", fsm.Variables.GetAllNamedVariables(), target.xPathVariables[i], out fsmVariableChangedFlag); // PlayMaker api is now not working on 1.8 and shoudl become private //target.xPathVariables[i] = VariableEditor.FsmVarPopup(new GUIContent("Variable _"+i+"_"),fsm,target.xPathVariables[i]); edited = edited || fsmVariableChangedFlag; if (i + 1 == count) { if (FsmEditorGUILayout.DeleteButton()) { ArrayUtility.RemoveAt(ref target.xPathVariables, i); return(true); // we must not continue, an entry is going to be deleted so the loop is broken here. next OnGui, all will be well. } } else { GUILayout.Space(21); } GUILayout.EndHorizontal(); } } string _addButtonLabel = "Add a variable"; if (count > 0) { _addButtonLabel = "Add another variable"; } GUILayout.BeginHorizontal(); GUILayout.Space(154); if (GUILayout.Button(_addButtonLabel)) { if (target.xPathVariables == null) { target.xPathVariables = new FsmVar[0]; } ArrayUtility.Add <FsmVar>(ref target.xPathVariables, new FsmVar()); edited = true; } GUILayout.Space(21); GUILayout.EndHorizontal(); return(edited || GUI.changed); }