Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: KSP-RO/RP-1
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 043e45226af0
Choose a base ref
...
head repository: KSP-RO/RP-1
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 41ca259fa3d4
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Aug 11, 2017

  1. Display astronauts and their retire NET dates in the Maintenance window

    Since there's not a lot else on the Astronauts tab, add a scroll list with the
     retirement NET dates.
    ec429 committed Aug 11, 2017
    Copy the full SHA
    87c785c View commit details
  2. Merge pull request #748 from ec429/maintUI

    Astronaut list in the UI
    NathanKell authored Aug 11, 2017
    Copy the full SHA
    41ca259 View commit details
Showing with 31 additions and 0 deletions.
  1. +24 −0 Source/Crew/CrewHandler.cs
  2. +7 −0 Source/Maintenance/MaintenanceWindow.cs
24 changes: 24 additions & 0 deletions Source/Crew/CrewHandler.cs
Original file line number Diff line number Diff line change
@@ -497,6 +497,30 @@ protected void AddRetireTime(KSP.UI.CrewListItem cli)
}
}

/* UI: display list of retirement NET dates. Called from MaintenanceWindow */
public void nautList()
{
GUILayout.BeginHorizontal();
try {
GUILayout.Space(40);
GUILayout.Label("Name", HighLogic.Skin.label, GUILayout.Width(120));
GUILayout.Label("Retires NET", HighLogic.Skin.label, GUILayout.Width(80));
} finally {
GUILayout.EndHorizontal();
}
foreach (string name in kerbalRetireTimes.Keys) {
GUILayout.BeginHorizontal();
try {
GUILayout.Space(40);
double rt = kerbalRetireTimes[name];
GUILayout.Label(name, HighLogic.Skin.label, GUILayout.Width(120));
GUILayout.Label(KSPUtil.PrintDate(rt, false), HighLogic.Skin.label, GUILayout.Width(80));
} finally {
GUILayout.EndHorizontal();
}
}
}

protected void FindAllCourseConfigs()
{
CourseTemplates.Clear();
7 changes: 7 additions & 0 deletions Source/Maintenance/MaintenanceWindow.cs
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ class MaintenanceWindow : MonoBehaviour
static bool guiEnabled = true;
private ApplicationLauncherButton button;
private GUIStyle rightLabel, boldLabel, boldRightLabel, pressedButton;
private Vector2 nautListScroll = new Vector2();

protected void Awake()
{
@@ -326,6 +327,12 @@ private void astronautsTab()
} finally {
GUILayout.EndHorizontal();
}
nautListScroll = GUILayout.BeginScrollView(nautListScroll, GUILayout.Width(280), GUILayout.Height(144));
try {
RP0.Crew.CrewHandler.Instance.nautList();
} finally {
GUILayout.EndScrollView();
}
GUILayout.BeginHorizontal();
try {
GUILayout.Label("Cost per astronaut", HighLogic.Skin.label, GUILayout.Width(160));