void WindowGUI(int windowID) { ELStyles.Init(); GUILayout.BeginVertical(); resscroll.Begin(); ResourceModules(resscroll.mouseOver); resscroll.End(); GUILayout.EndVertical(); TransferButtons(); CloseButton(); GUI.DragWindow(new Rect(0, 0, 10000, 20)); }
void InfoWindow(int windowID) { ELStyles.Init(); var cost = cashed_cost; double required_mass = 0; double resource_mass = 0; double kerbalHours = 0; foreach (var res in cost.required) { kerbalHours += res.kerbalHours * res.amount; required_mass += res.mass; } kerbalHours = Math.Round(kerbalHours, 4); foreach (var res in cost.optional) { resource_mass += res.mass; } GUILayout.BeginVertical(); MassLabel("Dry mass", buildCost.mass); MassLabel("Resource mass", resource_mass); MassLabel("Total mass", required_mass + resource_mass); UnitLabel("Build Time", kerbalHours, "Kh"); cost.optional.Sort(); GUILayout.Label(" "); ResourcePanel("Required", cost.required, reqScroll); ResourcePanel("Optional", cost.optional, optScroll); string ver = ELVersionReport.GetVersion(); GUILayout.Label(ver); GUILayout.EndVertical(); GUI.DragWindow(); }
void WindowGUI(int windowID) { ELStyles.Init(); SelectPad_start(); GUILayout.BeginVertical(); VesselName(); SelectPad(); switch (control.state) { case ELBuildControl.State.Idle: SelectCraft(); break; case ELBuildControl.State.Planning: SelectCraft(); SelectedCraft(); if (control.lockedParts) { resScroll.Begin(); LockedParts(); resScroll.End(); } else { resScroll.Begin(); RequiredResources(); CraftBoM(); resScroll.End(); BuildButton(); } break; case ELBuildControl.State.Building: SelectedCraft(); resScroll.Begin(); BuildProgress(true); resScroll.End(); PauseButton(); break; case ELBuildControl.State.Canceling: SelectedCraft(); resScroll.Begin(); BuildProgress(false); resScroll.End(); PauseButton(); break; case ELBuildControl.State.Complete: SelectedCraft(); FinalizeButton(); break; case ELBuildControl.State.Transfer: SelectedCraft(); resScroll.Begin(); OptionalResources(); resScroll.End(); ReleaseButton(); break; } GUILayout.EndVertical(); CloseButton(); SelectPad_end(); GUI.DragWindow(new Rect(0, 0, 10000, 20)); }