public override void WindowGUI(int windowID)
 {
     base.WindowGUI(windowID);
     GUILayout.BeginVertical();
     GUILayout.BeginHorizontal();
     ItemLabel("Fairing Pressure");
     turner.FairingPressure.setValue(GUILayout.TextField(string.Format("{0:0}", turner.FairingPressure), GUILayout.Width(60)));
     turner.FairingPressure.locked = GuiUtils.LockToggle(turner.FairingPressure.locked);
     helpWindow.Button("Dynamic pressure where we pop the procedural fairings.  Higher values will pop lower in the atmosphere, which saves weight, but can cause overheating.  Fairings are heavy, so it's definitely a good idea to pop them as soon as possible.");
     GUILayout.EndHorizontal();
     GUILayout.BeginHorizontal();
     ItemLabel("Stage Post Delay");
     turner.autostagePostDelay.setValue(GUILayout.TextField(string.Format("{0:0}", turner.autostagePostDelay), GUILayout.Width(60)));
     turner.autostagePostDelay.locked = GuiUtils.LockToggle(turner.autostagePostDelay.locked);
     helpWindow.Button("Delay after a stage event before we consider the next stage.");
     GUILayout.EndHorizontal();
     GUILayout.BeginHorizontal();
     ItemLabel("Stage Pre Delay");
     turner.autostagePreDelay.setValue(GUILayout.TextField(string.Format("{0:0}", turner.autostagePreDelay), GUILayout.Width(60)));
     turner.autostagePreDelay.locked = GuiUtils.LockToggle(turner.autostagePreDelay.locked);
     helpWindow.Button("Delay after running out of fuel before we activate the next stage.");
     GUILayout.EndHorizontal();
     GUILayout.BeginHorizontal();
     ItemLabel("Stage Limit");
     turner.autostageLimit.setValue(GUILayout.TextField(string.Format("{0:0}", turner.autostageLimit), GUILayout.Width(60)));
     turner.autostageLimit.locked = GuiUtils.LockToggle(turner.autostageLimit.locked);
     helpWindow.Button("Stop at this stage number");
     GUILayout.EndHorizontal();
     GUILayout.EndVertical();
 }
示例#2
0
 private void UiInclination()
 {
     GUILayout.BeginHorizontal();
     ItemLabel("Inclination");
     turner.Inclination.setValue(GUILayout.TextField(turner.Inclination.ToString(), GUILayout.Width(60)));
     turner.Inclination.locked = GuiUtils.LockToggle(turner.Inclination.locked);
     helpWindow.Button("Desired orbit inclination.  Any non-zero value WILL make your launch less efficient. Final inclination will also not be perfect.  Sorry about that, predicting coriolis is hard.");
     GUILayout.EndHorizontal();
 }
示例#3
0
 private void UiRoll()
 {
     GUILayout.BeginHorizontal();
     ItemLabel("Roll");
     turner.Roll.setValue(GUILayout.TextField(turner.Roll.ToString(), GUILayout.Width(60)));
     turner.Roll.locked = GuiUtils.LockToggle(turner.Roll.locked);
     helpWindow.Button("If you want a particular side of your ship to face downwards.  Shouldn't matter for most ships.  May cause mild nausea.");
     GUILayout.EndHorizontal();
 }
示例#4
0
 private void UiDestinationHeight()
 {
     GUILayout.BeginHorizontal();
     ItemLabel("Destination Height (km)");
     turner.DestinationHeight.setValue(GUILayout.TextField(turner.DestinationHeight.ToString(), GUILayout.Width(60)));
     turner.DestinationHeight.locked = GuiUtils.LockToggle(turner.DestinationHeight.locked);
     helpWindow.Button("Desired Apoapsis.");
     GUILayout.EndHorizontal();
 }
示例#5
0
 private void UiSensitivity()
 {
     GUILayout.BeginHorizontal();
     ItemLabel("Sensitivity");
     turner.Sensitivity.setValue(GUILayout.TextField(turner.Sensitivity.ToString(), GUILayout.Width(60)));
     turner.Sensitivity.locked = GuiUtils.LockToggle(turner.Sensitivity.locked);
     helpWindow.Button("Will not throttle below this value.  Mostly a factor at the end of ascent.");
     GUILayout.EndHorizontal();
 }
示例#6
0
 private void UiAPTimeFinish()
 {
     GUILayout.BeginHorizontal();
     ItemLabel("Hold AP Time Finish");
     turner.APTimeFinish.setValue(GUILayout.TextField(turner.APTimeFinish.ToString(), GUILayout.Width(60)));
     turner.APTimeFinish.locked = GuiUtils.LockToggle(turner.APTimeFinish.locked);
     helpWindow.Button("AP Time will fade to this value, to vary the steepness of the ascent during the ascent.");
     GUILayout.EndHorizontal();
 }
示例#7
0
 private void UiAPTimeStart()
 {
     GUILayout.BeginHorizontal();
     ItemLabel("Hold AP Time Start");
     turner.APTimeStart.setValue(GUILayout.TextField(turner.APTimeStart.ToString(), GUILayout.Width(60)));
     turner.APTimeStart.locked = GuiUtils.LockToggle(turner.APTimeStart.locked);
     helpWindow.Button("Starting value for Time To Prograde.  Higher values will make a steeper climb.  Steeper climbs are usually worse.  Lower values may cause overheating or death.");
     GUILayout.EndHorizontal();
 }
示例#8
0
 private void UiTurnAngle()
 {
     GUILayout.BeginHorizontal();
     ItemLabel("Turn Angle");
     turner.TurnAngle.setValue(GUILayout.TextField(string.Format("{0:0.0}", turner.TurnAngle), GUILayout.Width(60)));
     turner.TurnAngle.locked = GuiUtils.LockToggle(turner.TurnAngle.locked);
     helpWindow.Button("Angle to start turn at Start Speed.  Higher values may cause aerodynamic stress.");
     GUILayout.EndHorizontal();
 }
示例#9
0
 private void UiStartSpeed()
 {
     GUILayout.BeginHorizontal();
     ItemLabel("Start m/s");
     turner.StartSpeed.setValue(GUILayout.TextField(string.Format("{0:0.0}", turner.StartSpeed), GUILayout.Width(60)));
     turner.StartSpeed.locked = GuiUtils.LockToggle(turner.StartSpeed.locked);
     helpWindow.Button("At this speed, pitch to Turn Angle to begin the gravity turn.  Stronger rockets and extremely aerodynamically stable rockets should do this earlier.");
     GUILayout.EndHorizontal();
 }
示例#10
0
 private void UiPressureCutoff()
 {
     GUILayout.BeginHorizontal();
     ItemLabel("Pressure Cutoff");
     turner.PressureCutoff.setValue(GUILayout.TextField(turner.PressureCutoff.ToString(), GUILayout.Width(60)));
     turner.PressureCutoff.locked = GuiUtils.LockToggle(turner.PressureCutoff.locked);
     helpWindow.Button("Dynamic pressure where we change from Surface to Orbital velocity tracking\nThis will be a balance point between aerodynamic drag in the upper atmosphere vs. thrust vector loss.");
     GUILayout.EndHorizontal();
 }
示例#11
0
        public override void WindowGUI(int windowID)
        {
            base.WindowGUI(windowID);
            GUILayout.BeginVertical();
            GUILayout.BeginHorizontal();
            ItemLabel("Fairing Pressure");
            turner.FairingPressure.setValue(GUILayout.TextField(string.Format("{0:0}", turner.FairingPressure), GUILayout.Width(60)));
            turner.FairingPressure.locked = GuiUtils.LockToggle(turner.FairingPressure.locked);
            helpWindow.Button("Dynamic pressure where we pop the procedural fairings.  Higher values will pop lower in the atmosphere, which saves weight, but can cause overheating.  Fairings are heavy, so it's definitely a good idea to pop them as soon as possible.");
            GUILayout.EndHorizontal();
            GUILayout.BeginHorizontal();
            ItemLabel("Stage Post Delay");
            turner.autostagePostDelay.setValue(GUILayout.TextField(string.Format("{0:0}", turner.autostagePostDelay), GUILayout.Width(60)));
            turner.autostagePostDelay.locked = GuiUtils.LockToggle(turner.autostagePostDelay.locked);
            helpWindow.Button("Delay after a stage event before we consider the next stage.");
            GUILayout.EndHorizontal();
            GUILayout.BeginHorizontal();
            ItemLabel("Stage Pre Delay");
            turner.autostagePreDelay.setValue(GUILayout.TextField(string.Format("{0:0}", turner.autostagePreDelay), GUILayout.Width(60)));
            turner.autostagePreDelay.locked = GuiUtils.LockToggle(turner.autostagePreDelay.locked);
            helpWindow.Button("Delay after running out of fuel before we activate the next stage.");
            GUILayout.EndHorizontal();
            GUILayout.BeginHorizontal();
            ItemLabel("Stage Limit");
            turner.autostageLimit.setValue(GUILayout.TextField(string.Format("{0:0}", turner.autostageLimit), GUILayout.Width(60)));
            turner.autostageLimit.locked = GuiUtils.LockToggle(turner.autostageLimit.locked);
            helpWindow.Button("Stop at this stage number");
            GUILayout.EndHorizontal();

            GUILayout.Space(10);
            GUILayout.BeginHorizontal();

            if (GUILayout.Button("Clear Cache", GUILayout.Width(90)))
            {
                // Need to clear the cache directory
                // gt_launchdb*
                // gt_vessel*

                foreach (string f in Directory.EnumerateFiles(LaunchDB.GetBaseFilePath(this.GetType(), ""), "gt_vessel_*"))
                {
                    File.Delete(f);
                }
                foreach (string f in Directory.EnumerateFiles(LaunchDB.GetBaseFilePath(this.GetType(), ""), "gt_launchdb"))
                {
                    File.Delete(f);
                }
            }
#if false
            if (!turner.IsLaunchDBEmpty())
            {
                if (GUILayout.Button("Reset Guess", GUILayout.ExpandWidth(false)))
                {
                    if (File.Exists(GravityTurner.ConfigFilename(GravityTurner.getVessel)))
                    {
                        File.Delete(GravityTurner.ConfigFilename(GravityTurner.getVessel));
                    }

                    if (File.Exists(turner.launchdb.GetFilename()))
                    {
                        File.Delete(turner.launchdb.GetFilename());
                    }
                    turner.ClearLaunchDB();
                }
            }
#endif
            GUILayout.EndHorizontal();

            GUILayout.EndVertical();
            GUI.DragWindow();
        }