private void DoEventLine(SkillEvent fsmEvent) { int eventUseCount = SkillSearch.GetEventUseCount(SkillEditor.SelectedFsm, fsmEvent.get_Name()); GUILayout.BeginHorizontal((this.selectedEvent != null && fsmEvent.get_Name() == this.selectedEvent.get_Name()) ? SkillEditorStyles.SelectedEventBox : SkillEditorStyles.TableRowBox, new GUILayoutOption[0]); EditorGUI.BeginDisabledGroup(fsmEvent.get_IsSystemEvent()); bool flag = GUILayout.Toggle(fsmEvent.get_IsGlobal(), SkillEditorContent.GlobalEventTooltipLabel, SkillEditorStyles.TableRowCheckBox, new GUILayoutOption[] { GUILayout.MaxWidth(17f), GUILayout.MinWidth(17f) }); if (flag != fsmEvent.get_IsGlobal()) { SkillEditor.Builder.SetEventIsGlobal(SkillEditor.SelectedFsm, fsmEvent, flag); GlobalEventsWindow.ResetView(); } EditorGUI.EndDisabledGroup(); GUIStyle gUIStyle = (this.selectedEvent != null && fsmEvent.get_Name() == this.selectedEvent.get_Name()) ? SkillEditorStyles.TableRowTextSelected : SkillEditorStyles.TableRowText; if (GUILayout.Button(fsmEvent.get_Name(), gUIStyle, new GUILayoutOption[] { GUILayout.MinWidth(244f) })) { this.SelectEvent(fsmEvent, true); GUIUtility.set_keyboardControl(0); if (Event.get_current().get_button() == 1 || EditorGUI.get_actionKey()) { this.GenerateStateListMenu(this.selectedEvent).ShowAsContext(); } } GUILayout.FlexibleSpace(); GUILayout.Label(eventUseCount.ToString(CultureInfo.get_CurrentCulture()), gUIStyle, new GUILayoutOption[0]); GUILayout.Space(5f); if (SkillEditorGUILayout.DeleteButton()) { EditorCommands.DeleteEvent(fsmEvent); this.Reset(); } GUILayout.EndHorizontal(); }