Ejemplo n.º 1
0
 void LateUpdate()
 {
     if (_airSpeedGUI != null)
     {
         _airSpeedGUI.ChangeSurfVelocity();
     }
     else if (FlightUIController.fetch != null)
     {
         _airSpeedGUI = new AirspeedSettingsGUI(_vessel);
     }
 }
Ejemplo n.º 2
0
 private void LateUpdate()
 {
     if (airSpeedGUI != null)
     {
         airSpeedGUI.ChangeSurfVelocity();
     }
     else if (_vessel != null)
     {
         airSpeedGUI = new AirspeedSettingsGUI(_vessel);
     }
 }
 void LateUpdate()
 {
     OnGUIAppLauncherReady();
     if (_airSpeedGUI != null)
     {
         _airSpeedGUI.ChangeSurfVelocity();
     }
     else if (_vessel != null)
     {
         _airSpeedGUI = new AirspeedSettingsGUI(_vessel);
     }
 }
Ejemplo n.º 4
0
        void OnDestroy()
        {
            FlightGUIDrawer.SetGUIActive(this, false);
            GameEvents.onShowUI.Remove(ShowUI);
            GameEvents.onHideUI.Remove(HideUI);
            SaveConfigs();
            if (_vessel)
            {
                vesselFlightGUI.Remove(_vessel);
            }
            _physicsCalcs = null;

            if (_flightDataGUI != null)
            {
                _flightDataGUI.SaveSettings();
            }
            _flightDataGUI = null;

            if (_stabilityAugmentation != null)
            {
                _stabilityAugmentation.SaveAndDestroy();
            }
            _stabilityAugmentation = null;

            if (_airSpeedGUI != null)
            {
                _airSpeedGUI.SaveSettings();
            }
            _airSpeedGUI = null;

            if (_aeroVizGUI != null)
            {
                _aeroVizGUI.SaveSettings();
            }

            _flightStatusGUI = null;
            settingsWindow   = null;

            activeFlightGUICount--;

            if (activeFlightGUICount <= 0)
            {
                activeFlightGUICount = 0;
                if (blizzyFlightGUIButton != null)
                {
                    ClearBlizzyToolbarButton();
                }
            }

            savedShowGUI = showGUI;
        }
        public override void OnUpdate()
        {
            FlightGUI flightGUI = FlightGUI.vesselFlightGUI[vessel];

            if (flightGUI != null)
            {
                AirspeedSettingsGUI airspeedSettingsGUI = flightGUI.airSpeedGUI;
                if (airspeedSettingsGUI != null)
                {
                    if (airspeedSettingsGUI.GetVelocityDisplayString(out string value,
                                                                     out AirspeedSettingsGUI.SurfaceVelMode mode))
                    {
                        textObject.text.SetText(shortCaptions[(int)mode] + value);
                        return; // we are done here
                    }
                }
            }

            // if FAR velocity display is not ready or not used -> fall back to stock behaviour
            base.OnUpdate();
        }
        void OnDestroy()
        {
            GameEvents.onShowUI.Remove(ShowUI);
            GameEvents.onHideUI.Remove(HideUI);
            SaveConfigs();
            if (_vessel)
            {
                vesselFlightGUI.Remove(_vessel);
            }
            _physicsCalcs = null;

            if (_flightDataGUI != null)
            {
                _flightDataGUI.SaveSettings();
            }
            _flightDataGUI = null;

            if (_stabilityAugmentation != null)
            {
                _stabilityAugmentation.SaveAndDestroy();
            }
            _stabilityAugmentation = null;

            if (_airSpeedGUI != null)
            {
                _airSpeedGUI.SaveSettings();
            }
            _airSpeedGUI = null;

            _flightStatusGUI = null;
            settingsWindow   = null;

            if (blizzyFlightGUIButton != null)
            {
                blizzyFlightGUIButton.Destroy();
            }
        }
 void LateUpdate()
 {
     if (_airSpeedGUI != null)
         _airSpeedGUI.ChangeSurfVelocity();
     else if (FlightUIController.fetch != null)
         _airSpeedGUI = new AirspeedSettingsGUI(_vessel);
 }
        void OnDestroy()
        {
            GameEvents.onShowUI.Remove(ShowUI);
            GameEvents.onHideUI.Remove(HideUI);
            SaveConfigs();
            if (_vessel)
            {
                vesselFlightGUI.Remove(_vessel);
            }
            _physicsCalcs = null;

            if(_flightDataGUI != null)
                _flightDataGUI.SaveSettings();
            _flightDataGUI = null;

            if(_stabilityAugmentation != null)
                _stabilityAugmentation.SaveAndDestroy();
            _stabilityAugmentation = null;

            if(_airSpeedGUI != null)
                _airSpeedGUI.SaveSettings();
            _airSpeedGUI = null;

            if (_aeroVizGUI != null)
                _aeroVizGUI.SaveSettings();

            _flightStatusGUI = null;
            settingsWindow = null;

            activeFlightGUICount--;

            if (activeFlightGUICount <= 0)
            {
                activeFlightGUICount = 0;
                if (blizzyFlightGUIButton != null)
                    ClearBlizzyToolbarButton();
            }
            
        }
        void OnDestroy()
        {
            GameEvents.onShowUI.Remove(ShowUI);
            GameEvents.onHideUI.Remove(HideUI);
            SaveConfigs();
            if (_vessel)
            {
                vesselFlightGUI.Remove(_vessel);
            }
            _physicsCalcs = null;

            if(_flightDataGUI != null)
                _flightDataGUI.SaveSettings();
            _flightDataGUI = null;

            if(_stabilityAugmentation != null)
                _stabilityAugmentation.SaveAndDestroy();
            _stabilityAugmentation = null;

            if(_airSpeedGUI != null)
                _airSpeedGUI.SaveSettings();
            _airSpeedGUI = null;

            _flightStatusGUI = null;
            settingsWindow = null;

            if (blizzyFlightGUIButton != null)
                blizzyFlightGUIButton.Destroy();
        }