Launcher info links. (#12781)

This commit is contained in:
Pieter-Jan Briers
2022-12-03 02:23:43 +01:00
committed by GitHub
parent 083ef009d6
commit a6045e4538
12 changed files with 147 additions and 36 deletions

View File

@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.Linq;
using Content.Client.Links;
using Content.Client.Stylesheets;
using Content.Shared.CCVar;
using Robust.Client.AutoGenerated;
@@ -68,7 +67,8 @@ namespace Content.Client.Credits
// Do not show "become a patron" button on Steam builds
// since Patreon violates Valve's rules about alternative storefronts.
if (!_cfg.GetCVar(CCVars.BrandingSteam))
var linkPatreon = _cfg.GetCVar(CCVars.InfoLinksPatreon);
if (!_cfg.GetCVar(CCVars.BrandingSteam) && linkPatreon != "")
{
Button patronButton;
patronsContainer.AddChild(patronButton = new Button
@@ -78,7 +78,7 @@ namespace Content.Client.Credits
});
patronButton.OnPressed +=
_ => IoCManager.Resolve<IUriOpener>().OpenUri(UILinks.Patreon);
_ => IoCManager.Resolve<IUriOpener>().OpenUri(linkPatreon);
}
var first = true;
@@ -158,8 +158,13 @@ namespace Content.Client.Credits
AddSection(Loc.GetString("credits-window-original-remake-team-section-title"), "OriginalRemake.txt");
AddSection(Loc.GetString("credits-window-special-thanks-section-title"), "SpecialThanks.txt", true);
var linkGithub = _cfg.GetCVar(CCVars.InfoLinksGithub);
contributeButton.OnPressed += _ =>
IoCManager.Resolve<IUriOpener>().OpenUri(UILinks.GitHub);
IoCManager.Resolve<IUriOpener>().OpenUri(linkGithub);
if (linkGithub == "")
contributeButton.Visible = false;
}
private sealed class PatronEntry