Skip to content

Commit

Permalink
Removed vessel selection button test
Browse files Browse the repository at this point in the history
  • Loading branch information
jwvanderbeck committed Jan 2, 2015
1 parent 5492ede commit f4f9394
Showing 1 changed file with 1 addition and 27 deletions.
28 changes: 1 addition & 27 deletions TestFlightCore/TestFlightCore/TestFlight.cs
Original file line number Diff line number Diff line change
Expand Up @@ -364,33 +364,7 @@ internal override void DrawWindow(Int32 id)
GUILayout.Label("TestFlight is not currently tracking any vessels");
else
{
GUILayout.Label("Select Vessel to Display");
// Set up button to select vessel for display
string selectionButtonText = "Active Vessel";
if (winSettings.showSelectedVessel)
selectionButtonText = masterStatus[winSettings.selectedVessel].vesselName;
if (GUILayout.Button(selectionButtonText))
{
// If selection button is pressed, we open a scrollview containing buttons for all the vessels we track
winSettings.vesselSelectionScroll = GUILayout.BeginScrollView(winSettings.vesselSelectionScroll);
foreach (var entry in masterStatus)
{
GUILayout.Button(entry.Value.vesselName);
}
GUILayout.EndScrollView();
}

// Determine which vessel is our focused one
if (winSettings.showSelectedVessel)
{
if (!masterStatus.ContainsKey(winSettings.selectedVessel))
winSettings.selectedVessel = masterStatus.First().Key;
}
else
{
winSettings.selectedVessel = masterStatus[FlightGlobals.ActiveVessel.id];
}

winSettings.selectedVessel = FlightGlobals.ActiveVessel.id;
// Display information on selected vessel
GUILayout.Label("MSD for " + masterStatus[winSettings.selectedVessel].vesselName);
foreach (PartStatus status in masterStatus[winSettings.selectedVessel].allPartsStatus)
Expand Down

0 comments on commit f4f9394

Please sign in to comment.