Ejemplo n.º 1
0
        private void DebugAndDataTab(GUIStyle thisStyle)
        {
            GUILayout.BeginHorizontal();
            GUILayout.BeginVertical(GUILayout.Width(250));
            GUILayout.Label("Debug / Cheat Options");
            FARDebugValues.allowStructuralFailures = GUILayout.Toggle(FARDebugValues.allowStructuralFailures, "Allow Aero-structural Failures", thisStyle);

            GUILayout.Label("Editor GUI Graph Colors");


            Color tmpColor = GUIColors.Instance[0];

            ChangeColor("Cl", ref tmpColor, ref cLTexture);
            GUIColors.Instance[0] = tmpColor;

            tmpColor = GUIColors.Instance[1];
            ChangeColor("Cd", ref tmpColor, ref cDTexture);
            GUIColors.Instance[1] = tmpColor;

            tmpColor = GUIColors.Instance[2];
            ChangeColor("Cm", ref tmpColor, ref cMTexture);
            GUIColors.Instance[2] = tmpColor;

            tmpColor = GUIColors.Instance[3];
            ChangeColor("L_D", ref tmpColor, ref l_DTexture);
            GUIColors.Instance[3] = tmpColor;

            FARActionGroupConfiguration.DrawGUI();
            GUILayout.Label("Other Options"); // DaMichel: put it above the toolbar toggle
            FARDebugValues.aeroFailureExplosions = GUILayout.Toggle(FARDebugValues.aeroFailureExplosions, "Aero Failures Create Explosions", thisStyle);
            FARDebugValues.showMomentArrows      = GUILayout.Toggle(FARDebugValues.showMomentArrows, "Show Torque Arrows in Aero Overlay", thisStyle);
            if (ToolbarManager.ToolbarAvailable)
            {
                bool tmp = FARDebugValues.useBlizzyToolbar;
                FARDebugValues.useBlizzyToolbar = GUILayout.Toggle(FARDebugValues.useBlizzyToolbar, "Use Blizzy78 Toolbar instead of Stock AppManager", thisStyle);

                if (tmp != FARDebugValues.useBlizzyToolbar)
                {
                    if (FARDebugButtonBlizzy != null)
                    {
                        FARDebugButtonBlizzy.Destroy();
                    }

                    if (FARDebugValues.useBlizzyToolbar)
                    {
                        FARDebugButtonBlizzy             = ToolbarManager.Instance.add("ferram4", "FARDebugButtonBlizzy");
                        FARDebugButtonBlizzy.TexturePath = "FerramAerospaceResearch/Textures/icon_button_blizzy";
                        FARDebugButtonBlizzy.ToolTip     = "FAR Debug Options";
                        FARDebugButtonBlizzy.OnClick    += (e) => debugMenu = !debugMenu;
                    }
                }
            }
            GUILayout.EndVertical();
            GUILayout.BeginVertical();
            FARSettingsScenarioModule.Instance.DisplaySelection();



            GUILayout.EndVertical();
            GUILayout.EndHorizontal();
        }