private bool TemplateMatchesFilter(SkillTemplate template, IEnumerable <string> filter) { bool flag = SkillTemplateSelector.TemplateNameMatchesFilter(template, filter); if (flag || this.searchBox.SearchMode == 0) { return(flag); } return(SkillTemplateSelector.TemplateDescriptionMatchesFilter(template, filter)); }
private void DoBottomPanel() { SkillEditorGUILayout.Divider(new GUILayoutOption[0]); if (this.selectedTemplate == null) { EditorGUI.BeginDisabledGroup(true); GUILayout.TextField(Strings.get_Label_Category___(), new GUILayoutOption[0]); EditorGUILayout.TextArea(Strings.get_Label_Description___(), new GUILayoutOption[] { GUILayout.MinHeight(44f) }); EditorGUI.EndDisabledGroup(); } else { EditorGUI.BeginChangeCheck(); this.selectedTemplate.set_Category(EditorGUILayout.TextField(this.selectedTemplate.get_Category(), new GUILayoutOption[0])); this.selectedTemplate.fsm.set_Description(EditorGUILayout.TextArea(this.selectedTemplate.fsm.get_Description(), SkillEditorStyles.TextArea, new GUILayoutOption[] { GUILayout.MinHeight(44f) })); if (EditorGUI.EndChangeCheck()) { EditorUtility.SetDirty(this.selectedTemplate); Templates.InitList(); } if (this.eventType != 12 && this.currentEvent.get_clickCount() == 2 && SkillEditor.SelectedTemplate != this.selectedTemplate) { SkillTemplateSelector.AddTemplateToFsm(); this.currentEvent.Use(); } } if (GUILayout.Button(Strings.get_Label_New_Template(), new GUILayoutOption[0])) { SkillTemplate template = SkillBuilder.CreateTemplate(); this.SelectTemplate(template); base.Repaint(); } if (GUILayout.Button(Strings.get_Label_Load_All_Templates(), new GUILayoutOption[0])) { Templates.LoadAll(); base.Repaint(); } }