public void OnGUI() { if (vessel == null || !vessel.isActiveVessel) { vessel = FlightGlobals.ActiveVessel; if (vessel != null) { flightSys = vessel.gameObject.GetComponent <SolverFlightSys>(); } else { flightSys = null; } } if (vessel == null || (vessel.Parts.Count == 0) || flightSys == null || !ShowFlightGUIWindow || !ShowAllUIFlight) { return; } if (!GUIUtil.StylesInitialized) { GUIUtil.SetupStyles(); } FlightWindowPos = GUILayout.Window(GUIUtil.FlightWindowID, FlightWindowPos, FlightWindowGUI, "Engines GUI", GUILayout.MinWidth(150)); FlightGUISettings.OnSettingsWindowGUI(); GUIUnitsSettings.OnUnitsSettingsWindowGUI(); }
public void OnGUI() { if (vessel == null || !vessel.isActiveVessel) { vessel = FlightGlobals.ActiveVessel; if (vessel != null) flightSys = vessel.gameObject.GetComponent<SolverFlightSys>(); else flightSys = null; } if (vessel == null || (vessel.Parts.Count == 0) || flightSys == null || !ShowFlightGUIWindow || !ShowAllUIFlight) return; if (!GUIUtil.StylesInitialized) GUIUtil.SetupStyles(); FlightWindowPos = GUILayout.Window(GUIUtil.FlightWindowID, FlightWindowPos, FlightWindowGUI, "Engines GUI", GUILayout.MinWidth(150)); FlightGUISettings.OnSettingsWindowGUI(); GUIUnitsSettings.OnUnitsSettingsWindowGUI(); }