Exemple #1
0
        public override void OnStart(StartState state)
        {
            try
            {
                if (state == StartState.Editor)
                {
                    if (settings == null)
                    {
                        InitSettings();
                    }

                    this.part.OnEditorAttach  += OnEditorAttach;
                    this.part.OnEditorDetach  += OnEditorDetach;
                    this.part.OnEditorDestroy += OnEditorDestroy;

                    referenceBody = referenceBodies["Kerbin"];
                    OnEditorAttach();

                    if (this.part.Modules.Contains("FlightEngineer"))
                    {
                        windowTitle = "Kerbal Engineer Redux - Build Engineer (inc. Flight Engineer) Version " + Version.VERSION + Version.SUFFIX;
                    }
                    else
                    {
                        windowTitle = "Kerbal Engineer Redux - Build Engineer Version " + Version.VERSION + Version.SUFFIX;
                    }
                }
            }
            catch (Exception e)
            {
                print("Exception in BuildEng.OnStart: " + e);
            }
        }
Exemple #2
0
        private void DrawThrust()
        {
            GUILayout.BeginHorizontal(areaStyle);

            foreach (CelestialBodies.Body body in referenceBodies.bodies)
            {
                if (GUILayout.Toggle(referenceBody == body, body.name, buttonStyle))
                {
                    referenceBody = body;
                }
            }

            GUILayout.EndHorizontal();
        }
Exemple #3
0
        public override void OnStart(StartState state)
        {
            if (state == StartState.Editor)
            {
                this.part.OnEditorAttach  += OnEditorAttach;
                this.part.OnEditorDetach  += OnEditorDetach;
                this.part.OnEditorDestroy += OnEditorDestroy;

                referenceBody = referenceBodies["Kerbin"];
                OnEditorAttach();

                if (this.part.Modules.Contains("FlightEngineer"))
                {
                    windowTitle = "Kerbal Engineer Redux - Build Engineer (inc. Flight Engineer) Version " + Version.VERSION;
                }
                else
                {
                    windowTitle = "Kerbal Engineer Redux - Build Engineer Version " + Version.VERSION;
                }

                print("BuildEngineer: Start (" + state + ")");
            }
        }
Exemple #4
0
        private void DrawRefBodies()
        {
            GUILayout.BeginHorizontal(areaStyle);

            foreach (CelestialBodies.Body body in referenceBodies.bodies)
            {
                if (GUILayout.Toggle(referenceBody == body, body.name, buttonStyle))
                {
                    referenceBody = body;
                }
            }

            GUILayout.EndHorizontal();
        }
Exemple #5
0
        public override void OnStart(StartState state)
        {
            try
            {
                if (state == StartState.Editor)
                {
                    if (settings == null)
                        InitSettings();

                    this.part.OnEditorAttach += OnEditorAttach;
                    this.part.OnEditorDetach += OnEditorDetach;
                    this.part.OnEditorDestroy += OnEditorDestroy;

                    referenceBody = referenceBodies["Kerbin"];
                    OnEditorAttach();

                    if (this.part.Modules.Contains("FlightEngineer"))
                    {
                        windowTitle = "Kerbal Engineer Redux - Build Engineer (inc. Flight Engineer) Version " + Version.VERSION + Version.SUFFIX;
                    }
                    else
                    {
                        windowTitle = "Kerbal Engineer Redux - Build Engineer Version " + Version.VERSION + Version.SUFFIX;
                    }
                }
            }
            catch (Exception e)
            {
                print("Exception in BuildEng.OnStart: " + e);
            }
        }
Exemple #6
0
        public override void OnStart(StartState state)
        {
            if (state == StartState.Editor)
            {
                this.part.OnEditorAttach += OnEditorAttach;
                this.part.OnEditorDetach += OnEditorDetach;
                this.part.OnEditorDestroy += OnEditorDestroy;

                referenceBody = referenceBodies["Kerbin"];
                OnEditorAttach();

                if (this.part.Modules.Contains("FlightEngineer"))
                {
                    windowTitle = "Kerbal Engineer Redux - Build Engineer (inc. Flight Engineer) Version " + Version.VERSION;
                }
                else
                {
                    windowTitle = "Kerbal Engineer Redux - Build Engineer Version " + Version.VERSION;
                }

                print("BuildEngineer: Start (" + state + ")");
            }
        }