Esempio n. 1
0
        private bool otherStabilizerPresent; // Set to true if other stabilizing mod is present

        #endregion


        /// <summary>
        /// Plugin constructor
        /// </summary>
        public void Awake()
        {
            if (Instance != null)
            {
                Destroy(this);
                return;
            }
            Instance = this;

            CommonWindowProperties.ActiveSkin = UISkinManager.defaultSkin;
            CommonWindowProperties.UnitySkin  = null;
            CommonWindowProperties.RefreshStyles();

            MainView             = null;
            MainModel            = null;
            mainViewVisible      = false;
            SettingsView         = null;
            SettingsModel        = null;
            setttingsViewVisible = false;
            ControlView          = null;
            ControlModel         = null;
            controlViewVisible   = false;

            toolbarButton = null;

            GamePaused = false;
            ShowUI     = true;
            MapMode    = false;
            lastUpdate = DateTime.Now;

            BVControllers = new List <BVController>();

            Configuration.Load();
        }
Esempio n. 2
0
 /// <summary>
 /// Change active skin
 /// </summary>
 private void ChangeSkin()
 {
     if (kspSkin)
     {
         CommonWindowProperties.ActiveSkin = UISkinManager.defaultSkin;
         Configuration.Skin = 0;
     }
     else
     {
         CommonWindowProperties.ActiveSkin = CommonWindowProperties.UnitySkin;
         Configuration.Skin = 1;
     }
     CommonWindowProperties.RefreshStyles();
     BonVoyage.Instance.ResetWindows();
 }
Esempio n. 3
0
        /// <summary>
        /// Get Unity skin - only accessible in OnGUI
        /// </summary>
        void OnGUI()
        {
            if (GamePaused && !ShowUI)
            {
                return;
            }

            if (CommonWindowProperties.UnitySkin == null)
            {
                CommonWindowProperties.UnitySkin = StyleConverter.Convert(GUI.skin);

                // Load Unity skin, if it was saved in the config
                if (Configuration.Skin == 1)
                {
                    CommonWindowProperties.ActiveSkin = CommonWindowProperties.UnitySkin;
                    CommonWindowProperties.RefreshStyles();
                }
            }
        }