internal void Destroy() { if (!isAvailable || Button == null) { return; } Button.Destroy(); Button = null; QuickRevert.Log("Destroy", "QBlizzyToolbar"); }
internal void Reset() { if (Enabled) { Init(); } else { Destroy(); } QuickRevert.Log("Reset", "QBlizzyToolbar"); }
internal void Init() { if (!HighLogic.LoadedSceneIsGame || !isAvailable || !Enabled || Button != null) { return; } Button = ToolbarManager.Instance.add(QuickRevert.MOD, QuickRevert.MOD); Button.TexturePath = TexturePath; Button.ToolTip = QuickRevert.MOD + ": Settings"; Button.OnClick += (e) => OnClick(); Button.Visibility = new GameScenesVisibility(AppScenes); QuickRevert.Log("Init", "QBlizzyToolbar"); }
void OnClick() { QGUI.Instance.Settings(); QuickRevert.Log("OnClick", "QBlizzyToolbar"); }