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); }
public override void OnActivate() { uITextPanel.SetText("Mod Info: " + modDisplayName, 0.8f, true); modInfo.SetText(info); if (url.Equals("")) { modHomepageButton.Remove(); } else { uIElement.Append(modHomepageButton); } }
public override void OnActivate() { _modInfo.SetText(_info); _uITextPanel.SetText(Language.GetTextValue("tModLoader.ModInfoHeader") + _modDisplayName, 0.8f, true); if (_loadFromWeb) { _modInfo.Append(_loaderElement); _loading = true; _ready = false; _cts = new CancellationTokenSource(); Task.Factory.StartNew(() => { try { ServicePointManager.Expect100Continue = false; const string url = "http://javid.ddns.net/tModLoader/moddescription.php"; var values = new NameValueCollection { { "modname", _modName } }; using (WebClient client = new WebClient()) { ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, policyErrors) => policyErrors == SslPolicyErrors.None; client.UploadValuesCompleted += ReceiveModInfo; client.UploadValuesAsync(new Uri(url), "POST", values); } } catch (Exception e) { UIModBrowser.LogModBrowserException(e); } }, _cts.Token); } else { _loading = false; _ready = true; } }
public override void OnActivate() { Netplay.disconnect = true; messageBox.SetText(message); 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); }
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(); } } }
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(); } }
internal void SetMessage(string text) { message.SetText(text); }
internal void SetMessage(string text) { message.SetText(text); SetWebHelpURL(""); }
internal void SetMessage(string text) { message.SetText(text); SetWebHelpURL(""); showSkipButton = false; }
public override void OnActivate() { messageBox.SetText(message); }
public override void OnActivate() { messageBox.SetText(text); buttonAlt.SetText(altText); }
public override void OnActivate() { uITextPanel.SetText("Mod Info: " + Interface.modBrowser.selectedItem.displayname, 0.8f, true); modInfo.SetText(Interface.modBrowser.selectedItem.description); }