示例#1
0
        public override void OnActivate()
        {
            Netplay.disconnect = true;

            var continueKey = gotoMenu < 0 ? "Exit" : showRetry ? "Retry" : "Continue";

            continueButton.SetText(Language.GetTextValue("tModLoader." + continueKey));
            continueButton.TextColor = gotoMenu >= 0 ? Color.White : Color.Red;

            area.AddOrRemoveChild(webHelpButton, string.IsNullOrEmpty(webHelpURL));
            area.AddOrRemoveChild(skipLoadButton, showSkip);
            area.AddOrRemoveChild(exitAndDisableAllButton, gotoMenu < 0);
        }
示例#2
0
        public override void OnActivate()
        {
            base.OnActivate();

#if WINDOWS
            area.AddOrRemoveChild(autoUpdateButton, !string.IsNullOrEmpty(autoUpdateURL));
#endif
        }
示例#3
0
        public override void OnActivate()
        {
            base.OnActivate();

            if (FrameworkVersion.Framework != Framework.Mono || FrameworkVersion.Version >= new Version(5, 20))
            {
                _area.AddOrRemoveChild(_autoUpdateButton, !string.IsNullOrEmpty(_autoUpdateUrl));
            }
        }
示例#4
0
        public override void OnActivate()
        {
            messageBox.SetText(message);
            buttonAlt.SetText(altText);
            bool showAlt = !string.IsNullOrEmpty(altText);

            button.Left.Percent = showAlt ? 0 : .25f;
            area.AddOrRemoveChild(buttonAlt, showAlt);
        }
示例#5
0
        public override void Update(GameTime gameTime)
        {
            if (!_loading && _ready)
            {
                _modInfo.SetText(_info);

                if (!string.IsNullOrEmpty(_url))
                {
                    _uIElement.Append(_modHomepageButton);
                }

                if (_localMod != null)
                {
                    bool realDeleteButton = ModLoader.Mods.All(x => x.Name != _localMod.Name);
                    _uIElement.AddOrRemoveChild(_deleteButton, realDeleteButton);
                    _uIElement.AddOrRemoveChild(_fakeDeleteButton, !realDeleteButton);
                    _uIElement.Append(_extractButton);
                }
                Recalculate();
                _modInfo.RemoveChild(_loaderElement);
                _ready = false;
            }
        }
示例#6
0
        public override void Update(GameTime gameTime)
        {
            if (!_loading && _ready)
            {
                _uITextPanel.SetText(Language.GetTextValue("tModLoader.ModInfoHeader") + _modDisplayName, 0.8f, true);
                _uITextPanel.Recalculate();
                _modInfo.SetText(_info);

                if (!string.IsNullOrEmpty(_url))
                {
                    _uIElement.Append(_modHomepageButton);
                }

                if (_localMod != null)
                {
                    _uIElement.AddOrRemoveChild(_deleteButton, ModLoader.Mods.All(x => x.Name != _localMod.Name));
                    _uIElement.Append(_extractButton);
                    Recalculate();
                }
            }
        }
示例#7
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.AddOrRemoveChild(deleteButton, !ModLoader.Mods.Any(x => x.Name == localMod.Name));
         uIElement.Append(extractButton);
     }
     else
     {
         deleteButton.Remove();
         extractButton.Remove();
     }
 }