using Content.Shared.CCVar; using Robust.Client.AutoGenerated; using Robust.Client.UserInterface; using Robust.Client.UserInterface.CustomControls; using Robust.Client.UserInterface.XAML; using Robust.Shared.Configuration; namespace Content.Client.Options.UI; [GenerateTypedNameReferences] public sealed partial class EscapeMenu : DefaultWindow { public EscapeMenu() { RobustXamlLoader.Load(this); // TODO: removed with https://github.com/space-wizards/space-station-14/pull/44431 var uriOpener = IoCManager.Resolve(); var cfg = IoCManager.Resolve(); var bugReport = cfg.GetCVar(CCVars.InfoLinksBugReport); if (!string.IsNullOrWhiteSpace(bugReport)) { BugReportButton.OnPressed += _ => uriOpener.OpenUri(bugReport); } else { BugReportButton.Visible = false; } } }