private static void DoStateRow(SkillState state) { GUIContent gUIContent = new GUIContent(state.get_Name(), state.get_Name()); if (SkillEditorGUILayout.TableRow(new GUIContent[] { gUIContent }, new float[] { 1f }, SkillEditor.SelectedState == state, FsmErrorChecker.StateHasErrors(state), new GUILayoutOption[0]) >= 0) { StateSelector.SelectState(state); GUIUtility.ExitGUI(); } if (state == SkillEditor.SelectedState && Event.get_current().get_type() == 7) { StateSelector.selectedRect = GUILayoutUtility.GetLastRect(); StateSelector.selectedRect.set_y(StateSelector.selectedRect.get_y() - StateSelector.scrollPosition.y); } }
private void DoTableRow(Skill fsm) { if (fsm == null || fsm.get_Owner() == null) { return; } GUILayout.BeginHorizontal(new GUILayoutOption[] { GUILayout.Height(15f) }); fsm.get_Owner().set_enabled(GUILayout.Toggle(fsm.get_Owner().get_enabled(), new GUIContent("", Strings.get_Label_Enabled()), SkillEditorStyles.TableRowCheckBox, new GUILayoutOption[] { GUILayout.MaxWidth(17f) })); string fullFsmLabel = Labels.GetFullFsmLabel(fsm); GUIContent gUIContent = new GUIContent("", fullFsmLabel); if (FsmEditorSettings.FsmBrowserShowFullPath && this.showFullPath) { gUIContent.set_text(fullFsmLabel); } else { gUIContent.set_text(Labels.GetFsmLabel(fsm)); } GUIContent gUIContent2 = new GUIContent(); if (GameStateTracker.CurrentState == GameState.Stopped) { gUIContent2.set_text((fsm.get_Template() != null) ? fsm.get_Template().fsm.get_StartState() : fsm.get_StartState()); } else { gUIContent2.set_text((fsm.get_ActiveState() == null) ? Strings.get_FsmSelector_no_active_state() : fsm.get_ActiveState().get_Name()); } gUIContent2.set_tooltip(gUIContent2.get_text()); switch (SkillEditorGUILayout.TableRow(new GUIContent[] { gUIContent, gUIContent2 }, new float[] { 0.6f, 0.4f }, SkillEditor.SelectedFsm == fsm, FsmErrorChecker.FsmHasErrors(fsm), new GUILayoutOption[0])) { case 0: SkillEditor.SelectFsm(fsm); GUIUtility.ExitGUI(); break; case 1: SkillEditor.SelectFsm(fsm); SkillEditor.SelectStateByName(gUIContent2.get_text(), true); GUIUtility.ExitGUI(); break; } GUILayout.EndHorizontal(); if (fsm == SkillEditor.SelectedFsm && Event.get_current().get_type() == 7) { SkillSelector.selectedRect = GUILayoutUtility.GetLastRect(); SkillSelector.selectedRect.set_y(SkillSelector.selectedRect.get_y() - this.scrollPosition.y); } }