private void GenerateWindow() { var tabStrings = new[] { "Kolony Statistics", "Local Logistics", "Planetary Logistics" }; GUILayout.BeginVertical(); GUILayout.BeginHorizontal(); curTab = GUILayout.SelectionGrid(curTab, tabStrings, 6, _smButtonStyle); GUILayout.EndHorizontal(); switch (curTab) { case 0: StatScreen(); break; case 1: _localLogistics.displayAndRun(); break; case 2: PlanLogScreen(); break; } GUILayout.EndVertical(); GUI.DragWindow(); }
/// <summary> /// Displays the main MKS UI /// </summary> private void OnWindow(int windowId) { GUILayout.BeginVertical(); // Show UI navigation tabs GUILayout.BeginHorizontal(); activeTab = GUILayout.SelectionGrid(activeTab, _tabLabels, 6, _smButtonStyle); GUILayout.EndHorizontal(); // Show the UI for the currently selected tab switch (activeTab) { case 0: ShowKolonyStats(); break; case 1: _localLogistics.displayAndRun(); break; case 2: ShowPlanetaryLogistics(); break; case 3: _kolonyInventory.Display(); break; case 4: ShowOrbitalLogistics(); break; } GUILayout.EndVertical(); // Make UI window draggable GUI.DragWindow(); }