Button() публичный Метод

public Button ( string helpMessage ) : void
helpMessage string
Результат void
Пример #1
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.EndVertical();
 }
Пример #2
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();
 }
Пример #3
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();
        }