internal static void Display(int windowId) { // Reset Tooltip active flag... ToolTipActive = false; ShowToolTips = Settings.RosterToolTips; Rect rect = new Rect(396, 4, 16, 16); if (GUI.Button(rect, new GUIContent("", "Close Window"))) { OnCreate = false; SelectedKerbal = null; ToolTip = ""; if (HighLogic.LoadedScene == GameScenes.SPACECENTER) { SMAddon.OnSMRosterToggle(); } else { Settings.ShowRoster = false; } } if (Event.current.type == EventType.Repaint && ShowToolTips == true) { ToolTip = Utilities.SetActiveTooltip(rect, Settings.RosterPosition, GUI.tooltip, ref ToolTipActive, 0, 0); } try { GUIStyle style = GUI.skin.button; var defaultColor = style.normal.textColor; GUILayout.BeginVertical(); RosterListViewer(); if (OnCreate) { CreateKerbalViewer(); } else if (SelectedKerbal != null) { EditKerbalViewer(); } else { if (GUILayout.Button("Create Kerbal", GUILayout.MaxWidth(120))) { OnCreate = true; } } GUILayout.EndVertical(); GUI.DragWindow(new Rect(0, 0, Screen.width, 30)); } catch (Exception ex) { Utilities.LogMessage(string.Format(" in Roster Window. Error: {0} \r\n\r\n{1}", ex.Message, ex.StackTrace), "Error", true); } }