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); } }
private void Start() { Assembly assembly = AssemblyLoader.loadedAssemblies.GetByAssembly(Assembly.GetExecutingAssembly()).assembly; var ainfoV = Attribute.GetCustomAttribute(assembly, typeof(AssemblyInformationalVersionAttribute)) as AssemblyInformationalVersionAttribute; switch (ainfoV == null) { case true: _version = ""; break; default: _version = ainfoV.InformationalVersion; break; } settings = HighLogic.CurrentGame.Parameters.CustomParams <SEP_GameParameters>(); if (!settings.stockToolbar && ToolbarManager.ToolbarAvailable) { toolbar = gameObject.AddComponent <SEP_Blizzy_Toolbar>(); } }
private void Start() { settings = HighLogic.CurrentGame.Parameters.CustomParams <SEP_GameParameters>(); }