コード例 #1
0
 void OnDestroy()
 {
     Instance = null;
     if (ELSettingsButton != null)
     {
         ELSettingsButton.Destroy();
     }
     ELAppButton.Toggle -= ELSettings.ToggleGUI;
 }
コード例 #2
0
        public void Awake()
        {
            Instance            = this;
            ELAppButton.Toggle += ELSettings.ToggleGUI;

            if (ToolbarManager.Instance == null)
            {
                return;
            }
            ELSettingsButton             = ToolbarManager.Instance.add("ExtraplanetaryLaunchpads", "ELSettingsButton");
            ELSettingsButton.Visible     = ELSettings.PreferBlizzy;
            ELSettingsButton.TexturePath = "ExtraplanetaryLaunchpads/Textures/icon_button";
            ELSettingsButton.ToolTip     = "EL Settings Window";
            ELSettingsButton.OnClick    += (e) => ELSettings.ToggleGUI();
        }