private void createVesselInfoLayout(vesselInfo currentVessel, string partString, string scienceString, string crewString) { GUILayout.BeginHorizontal(areaStyle); if (GUILayout.Toggle(currentVessel.importantInfo.recover, "", toggleStyle)) { currentVessel.importantInfo.recover = true; } else { currentVessel.importantInfo.recover = false; } Utilities.UI.createLabel(currentVessel.importantInfo.vesselName, textStyle); if (situations.ContainsKey(currentVessel.importantInfo.vessel.situation)) { Utilities.UI.createLabel(currentVessel.importantInfo.vessel.mainBody.name, textStyleShort, situations[currentVessel.importantInfo.vessel.situation]); } else { Utilities.debug(modName, Utilities.LogMode.Error, "Situation not found: " + currentVessel.importantInfo.vessel.situation.ToString()); Utilities.UI.createLabel(currentVessel.importantInfo.vessel.mainBody.name, textStyleShort, "Unknown"); } //part funds and tooltip Utilities.UI.createLabel((currentVessel.importantInfo.totalCost).ToString("N2"), textStyleShort, partString); //science value and tooltip Utilities.UI.createLabel(currentVessel.importantInfo.totalScience.ToString("N2"), textStyleShorter, scienceString); //crew members and tooltip Utilities.UI.createLabel(currentVessel.importantInfo.crewCount.ToString("N0"), textStyleShorter, crewString); GUILayout.EndHorizontal(); }
private void createVesselInfoLayout(vesselInfo currentVessel, string partString, string scienceString, string crewString) { GUILayout.BeginHorizontal(areaStyle); if (GUILayout.Toggle(currentVessel.importantInfo.recover, "", toggleStyle)) { currentVessel.importantInfo.recover = true; } else { currentVessel.importantInfo.recover = false; } Utilities.UI.createLabel(currentVessel.importantInfo.vesselName, textStyle); //part funds and tooltip Utilities.UI.createLabel((currentVessel.importantInfo.totalCost * currentVessel.importantInfo.distanceModifier).ToString("N2"), textStyleShort, partString); //science value and tooltip Utilities.UI.createLabel(currentVessel.importantInfo.totalScience.ToString("N2"), textStyleShort, scienceString); //crew members and tooltip Utilities.UI.createLabel(currentVessel.importantInfo.crewCount.ToString("N0"), textStyleShorter, crewString); //crew members and tooltip Utilities.UI.createLabel((currentVessel.importantInfo.distanceModifier * 100).ToString("N2") + "%", textStyleShort); GUILayout.EndHorizontal(); }