예제 #1
0
 private void BackClick(UIMouseEvent evt, UIElement listeningElement)
 {
     _cts?.Cancel(false);
     Main.PlaySound(11);
     Main.menuMode = _gotoMenu;
     _info         = string.Empty;
     SetMod(null);
     SetGotoMenu(0);
     SetModName(string.Empty);
     SetUrl(string.Empty);
     _modHomepageButton.Remove();
     _deleteButton.Remove();
     _extractButton.Remove();
 }
예제 #2
0
        public override void OnDeactivate()
        {
            base.OnDeactivate();

            _cts?.Cancel(false);
            _info           = string.Empty;
            _localMod       = null;
            _gotoMenu       = 0;
            _modName        = string.Empty;
            _modDisplayName = string.Empty;
            _url            = string.Empty;
            _modHomepageButton.Remove();
            _deleteButton.Remove();
            _extractButton.Remove();
        }
예제 #3
0
 public override void OnActivate()
 {
     uITextPanel.SetText(Language.GetTextValue("tModLoader.ModInfoHeader") + modDisplayName, 0.8f, true);
     modInfo.SetText(info);
     if (url.Equals(""))
     {
         modHomepageButton.Remove();
     }
     else
     {
         uIElement.Append(modHomepageButton);
     }
     if (localMod != null)
     {
         uIElement.Append(deleteButton);
         uIElement.Append(extractButton);
     }
     else
     {
         deleteButton.Remove();
         extractButton.Remove();
     }
 }