Пример #1
0
        private void onSettingsApplied()
        {
            settings = HighLogic.CurrentGame.Parameters.CustomParams <SEP_GameParameters>();

            if (window != null)
            {
                window.SetScale(settings.scale);
            }

            if (compactWindow != null)
            {
                compactWindow.SetScale(settings.scale);
            }
        }
        private void onSettingsApplied()
        {
            settings = HighLogic.CurrentGame.Parameters.CustomParams <SEP_GameParameters>();

            if (settings.stockToolbar)
            {
                if (button == null)
                {
                    StartCoroutine(onReadyWait());
                }

                if (toolbar != null)
                {
                    Destroy(toolbar);
                }

                toolbar = null;
            }
            else
            {
                if (toolbar == null)
                {
                    toolbar = gameObject.AddComponent <SEP_Blizzy_Toolbar>();
                }

                if (button != null)
                {
                    ApplicationLauncher.Instance.RemoveModApplication(button);
                }

                button = null;
            }

            if (window != null)
            {
                window.SetScale(settings.scale);
            }

            if (compactWindow != null)
            {
                compactWindow.SetScale(settings.scale);
            }
        }