internal void Display() { string step = ""; try { step = "0 - Start"; RMStyle.SetupGui(); if (WindowDebugger.ShowWindow) { step = "2 - Debugger"; WindowDebugger.Position = GUILayout.Window(318643, WindowDebugger.Position, WindowDebugger.Display, $"{Localizer.Format("#autoLOC_RM_1001")} {RMSettings.CurVersion}", GUILayout.MinHeight(20)); // #autoLOC_RM_1001 = Roster Manager - Debug Console - Ver. } if (HighLogic.LoadedScene == GameScenes.SPACECENTER || HighLogic.LoadedScene == GameScenes.EDITOR || HighLogic.LoadedScene == GameScenes.TRACKSTATION || HighLogic.LoadedScene == GameScenes.FLIGHT) { if (WindowSettings.ShowWindow) { step = "3 - Show Settings"; WindowSettings.Position = GUILayout.Window(318546, WindowSettings.Position, WindowSettings.Display, Localizer.Format("#autoLOC_RM_1002"), GUILayout.MinHeight(20)); // #autoLOC_RM_1002 = Roster Manager Settings } if (WindowContracts.ShowWindow) { step = "4 - Roster Contracts"; WindowContracts.Position = GUILayout.Window(318987, WindowContracts.Position, WindowContracts.Display, Localizer.Format("#autoLOC_RM_1003"), GUILayout.MinHeight(20)); // #autoLOC_RM_1003 = Roster Contracts } if (WindowRoster.ShowWindow) { if (WindowRoster.DisplayMode == WindowRoster.DisplayModes.Index) { step = "5 - Reset Roster Size"; WindowRoster.Position.height = 335; //reset hight } step = "6 - Show Roster"; WindowRoster.Position = GUILayout.Window(318547, WindowRoster.Position, WindowRoster.Display, Localizer.Format("#autoLOC_RM_1004"), GUILayout.MinHeight(20)); // #autoLOC_RM_1004 = Roster Manager } } step = "1 - Show Interface(s)"; } catch (Exception ex) { RmUtils.LogMessage($" in drawGui at or near step: {step}. Error: {ex.Message} \n\n{ex.StackTrace}", "Error", true); } }
internal void Display() { var step = ""; try { step = "0 - Start"; RMStyle.SetupGui(); if (WindowDebugger.ShowWindow) { step = "2 - Debugger"; WindowDebugger.Position = GUILayout.Window(318643, WindowDebugger.Position, WindowDebugger.Display, "Roster Manager - Debug Console - Ver. " + RMSettings.CurVersion, GUILayout.MinHeight(20)); } if (HighLogic.LoadedScene == GameScenes.SPACECENTER || HighLogic.LoadedScene == GameScenes.EDITOR || HighLogic.LoadedScene == GameScenes.TRACKSTATION || HighLogic.LoadedScene == GameScenes.FLIGHT) { if (WindowSettings.ShowWindow) { step = "3 - Show Settings"; WindowSettings.Position = GUILayout.Window(318546, WindowSettings.Position, WindowSettings.Display, "Roster Manager Settings", GUILayout.MinHeight(20)); } if (WindowContracts.ShowWindow) { step = "4 - Roster Contracts"; WindowContracts.Position = GUILayout.Window(318987, WindowContracts.Position, WindowContracts.Display, "Roster Contracts", GUILayout.MinHeight(20)); } if (WindowRoster.ShowWindow) { if (WindowRoster.DisplayMode == WindowRoster.DisplayModes.Index) { step = "5 - Reset Roster Size"; WindowRoster.Position.height = 335; //reset hight } step = "6 - Show Roster"; WindowRoster.Position = GUILayout.Window(318547, WindowRoster.Position, WindowRoster.Display, "Roster Manager", GUILayout.MinHeight(20)); } } step = "1 - Show Interface(s)"; } catch (Exception ex) { Utilities.LogMessage(string.Format(" in drawGui at or near step: " + step + ". Error: {0} \r\n\r\n{1}", ex.Message, ex.StackTrace), "Error", true); } }
internal void Display() { try { RMStyle.SetupGui(); if (WindowDebugger.ShowWindow) { WindowDebugger.Position = GUILayout.Window(318643, WindowDebugger.Position, WindowDebugger.Display, $"{Localizer.Format("#autoLOC_RM_1001")} {RMSettings.CurVersion}", GUILayout.MinHeight(20)); // #autoLOC_RM_1001 = Roster Manager - Debug Console - Ver. } if (IsCorrectSceneLoaded()) { if (WindowSettings.ShowWindow) { WindowSettings.Position = GUILayout.Window(318546, WindowSettings.Position, WindowSettings.Display, Localizer.Format("#autoLOC_RM_1002"), GUILayout.MinHeight(20)); // #autoLOC_RM_1002 = Roster Manager Settings } if (WindowContracts.ShowWindow) { WindowContracts.Position = GUILayout.Window(318987, WindowContracts.Position, WindowContracts.Display, Localizer.Format("#autoLOC_RM_1003"), GUILayout.MinHeight(20)); // #autoLOC_RM_1003 = Roster Contracts } if (WindowRoster.ShowWindow) { if (WindowRoster.DisplayMode == WindowRoster.DisplayModes.None) { WindowRoster.Position.height = WindowRoster.WindowHeight + WindowRoster.HeightScale; //reset height } WindowRoster.Position = GUILayout.Window(318547, WindowRoster.Position, WindowRoster.Display, Localizer.Format("#autoLOC_RM_1004"), GUILayout.MinHeight(20)); // #autoLOC_RM_1004 = Roster Manager } } } catch (Exception ex) { RmUtils.LogMessage($" in drawGui. Error: {ex.Message} \n\n{ex.StackTrace}", "Error", true); } }