private void OverallSelectionGUI(int windowId) { GUILayout.BeginHorizontal(GUILayout.Width(800)); modeDropdown.GUIDropDownDisplay(); currentMode = modeDropdown.ActiveSelection; GUILayout.BeginVertical(); if (GUILayout.Button(gearToggle ? Localizer.Format("FARGearToggleLower") : Localizer.Format("FARGearToggleRaise"))) { ToggleGear(); } GUILayout.EndVertical(); GUILayout.BeginVertical(); if (GUILayout.Button(showAoAArrow ? Localizer.Format("FARVelIndHide") : Localizer.Format("FARVelIndShow"))) { showAoAArrow = !showAoAArrow; } GUILayout.EndVertical(); GUILayout.EndHorizontal(); switch (currentMode) { case FAREditorMode.STATIC: _editorGraph.Display(); guiRect.height = useKSPSkin ? 570 : 450; break; case FAREditorMode.STABILITY: _stabDeriv.Display(); guiRect.height = useKSPSkin ? 680 : 450; break; case FAREditorMode.SIMULATION: _stabDerivLinSim.Display(); guiRect.height = useKSPSkin ? 570 : 450; break; case FAREditorMode.AREA_RULING: CrossSectionAnalysisGUI(); DebugVisualizationGUI(); guiRect.height = useKSPSkin ? 350 : 220; break; } GUI.DragWindow(); }
void OverallSelectionGUI(int windowId) { GUILayout.BeginHorizontal(GUILayout.Width(800)); modeDropdown.GUIDropDownDisplay(); currentMode = modeDropdown.ActiveSelection; GUILayout.BeginVertical(); if (GUILayout.Button(gearToggle ? "Lower Gear" : "Raise Gear")) { ToggleGear(); } GUILayout.EndVertical(); GUILayout.BeginVertical(); if (GUILayout.Button(showAoAArrow ? "Hide Vel Indicator" : "Show Vel Indicator")) { showAoAArrow = !showAoAArrow; } GUILayout.EndVertical(); GUILayout.EndHorizontal(); //GUILayout.EndHorizontal(); if (currentMode == FAREditorMode.STATIC) { _editorGraph.Display(); guiRect.height = useKSPSkin ? 570 : 450; } else if (currentMode == FAREditorMode.STABILITY) { _stabDeriv.Display(); guiRect.height = useKSPSkin ? 680 : 450; } else if (currentMode == FAREditorMode.SIMULATION) { _stabDerivLinSim.Display(); guiRect.height = useKSPSkin ? 570 : 450; } else if (currentMode == FAREditorMode.AREA_RULING) { CrossSectionAnalysisGUI(); DebugVisualizationGUI(); guiRect.height = useKSPSkin ? 350 : 220; } GUI.DragWindow(); }
void OverallSelectionGUI(int windowId) { GUILayout.BeginHorizontal(GUILayout.Width(500)); currentMode = (FAREditorMode)GUILayout.SelectionGrid((int)currentMode, FAReditorMode_str, 4); GUILayout.BeginVertical(); if (GUILayout.Button(gearToggle ? "Lower Gear" : "Raise Gear")) { ToggleGear(); } GUILayout.EndVertical(); GUILayout.EndHorizontal(); //GUILayout.EndHorizontal(); if (currentMode == FAREditorMode.STATIC) { _editorGraph.Display(); guiRect.height = useKSPSkin ? 570 : 450; } else if (currentMode == FAREditorMode.STABILITY) { _stabDeriv.Display(); guiRect.height = useKSPSkin ? 610 : 450; } else if (currentMode == FAREditorMode.SIMULATION) { _stabDerivLinSim.Display(); guiRect.height = useKSPSkin ? 570 : 450; } else if (currentMode == FAREditorMode.AREA_RULING) { CrossSectionAnalysisGUI(); DebugVisualizationGUI(); guiRect.height = useKSPSkin ? 330 : 220; } GUI.DragWindow(); }
void OverallSelectionGUI(int windowId) { GUILayout.BeginHorizontal(GUILayout.Width(500)); currentMode = (FAREditorMode)GUILayout.SelectionGrid((int)currentMode, FAReditorMode_str, 4); GUILayout.BeginVertical(); if (GUILayout.Button(gearToggle ? "Lower Gear" : "Raise Gear")) ToggleGear(); GUILayout.EndVertical(); GUILayout.EndHorizontal(); //GUILayout.EndHorizontal(); if (currentMode == FAREditorMode.STATIC) { _editorGraph.Display(); guiRect.height = useKSPSkin ? 570 : 450; } else if (currentMode == FAREditorMode.STABILITY) { _stabDeriv.Display(); guiRect.height = useKSPSkin ? 610 : 450; } else if (currentMode == FAREditorMode.SIMULATION) { _stabDerivLinSim.Display(); guiRect.height = useKSPSkin ? 570 : 450; } else if (currentMode == FAREditorMode.AREA_RULING) { CrossSectionAnalysisGUI(); DebugVisualizationGUI(); guiRect.height = useKSPSkin ? 330 : 220; } GUI.DragWindow(); }
void OverallSelectionGUI(int windowId) { GUILayout.BeginHorizontal(GUILayout.Width(800)); modeDropdown.GUIDropDownDisplay(); currentMode = modeDropdown.ActiveSelection; GUILayout.BeginVertical(); if (GUILayout.Button(gearToggle ? "Lower Gear" : "Raise Gear")) ToggleGear(); GUILayout.EndVertical(); GUILayout.BeginVertical(); if (GUILayout.Button(showAoAArrow ? "Hide Vel Indicator" : "Show Vel Indicator")) showAoAArrow = !showAoAArrow; GUILayout.EndVertical(); GUILayout.EndHorizontal(); //GUILayout.EndHorizontal(); if (currentMode == FAREditorMode.STATIC) { _editorGraph.Display(); guiRect.height = useKSPSkin ? 570 : 450; } else if (currentMode == FAREditorMode.STABILITY) { _stabDeriv.Display(); guiRect.height = useKSPSkin ? 610 : 450; } else if (currentMode == FAREditorMode.SIMULATION) { _stabDerivLinSim.Display(); guiRect.height = useKSPSkin ? 570 : 450; } else if (currentMode == FAREditorMode.AREA_RULING) { CrossSectionAnalysisGUI(); DebugVisualizationGUI(); guiRect.height = useKSPSkin ? 330 : 220; } GUI.DragWindow(); }
private void ActualGUI(int windowID) { GUIStyle TabLabelStyle = new GUIStyle(GUI.skin.label); TabLabelStyle.fontStyle = FontStyle.Bold; TabLabelStyle.alignment = TextAnchor.UpperCenter; if (!minimize) { bool tmp = false; GUILayout.BeginHorizontal(); FAREditorMode lastMode = Mode; Mode = (FAREditorMode)GUILayout.SelectionGrid((int)Mode, FAReditorMode_str, 4, ButtonStyle); if (lastMode != Mode) tmp = true; GUILayout.EndHorizontal(); if (Mode == FAREditorMode.STATIC) GraphGUI(tmp); else if (Mode == FAREditorMode.STABILITY) StabilityDerivativeGUI(tmp); else SimulationGUI(tmp); } GUI.DragWindow(); }
private void ActualGUI(int windowID) { GUIStyle ButtonStyle = new GUIStyle(GUI.skin.button); ButtonStyle.normal.textColor = ButtonStyle.focused.textColor = Color.white; ButtonStyle.hover.textColor = ButtonStyle.active.textColor = Color.yellow; ButtonStyle.onNormal.textColor = ButtonStyle.onFocused.textColor = ButtonStyle.onHover.textColor = ButtonStyle.onActive.textColor = Color.green; ButtonStyle.padding = new RectOffset(4, 4, 4, 4); GUIStyle BackgroundStyle = new GUIStyle(GUI.skin.box); BackgroundStyle.hover = BackgroundStyle.active = BackgroundStyle.normal; GUIStyle TabLabelStyle = new GUIStyle(GUI.skin.label); TabLabelStyle.fontStyle = FontStyle.Bold; TabLabelStyle.alignment = TextAnchor.UpperCenter; if (!minimize) { bool tmp = false; GUILayout.BeginHorizontal(); FAREditorMode lastMode = Mode; Mode = (FAREditorMode)GUILayout.SelectionGrid((int)Mode, FAReditorMode_str, 4, ButtonStyle); if (lastMode != Mode) tmp = true; GUILayout.EndHorizontal(); if (Mode == FAREditorMode.STATIC) GraphGUI(tmp); else if (Mode == FAREditorMode.STABILITY) StabilityDerivativeGUI(tmp); else SimulationGUI(tmp); } GUI.DragWindow(); }