From 56980a73da2e2972726f443091c0559d5c47c8fc Mon Sep 17 00:00:00 2001 From: rhailrake <49613070+rhailrake@users.noreply.github.com> Date: Fri, 8 Sep 2023 18:29:43 +0600 Subject: [PATCH] fix (#373) --- Content.Client/Info/RulesAndInfoWindow.cs | 1 - Content.Client/White/Rules/RulesWikiSection.xaml.cs | 10 +++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Content.Client/Info/RulesAndInfoWindow.cs b/Content.Client/Info/RulesAndInfoWindow.cs index c14bbb60de..6ace01494f 100644 --- a/Content.Client/Info/RulesAndInfoWindow.cs +++ b/Content.Client/Info/RulesAndInfoWindow.cs @@ -41,7 +41,6 @@ namespace Content.Client.Info // AddSection(rulesList, _rules.RulesSection()); var rulesWikiSection = new RulesWikiSection(); rulesList.InfoContainer.AddChild(rulesWikiSection); - rulesWikiSection.RulesButton.OnPressed += _ => _uri.OpenUri(_cfg.GetCVar(WhiteCVars.RulesWiki)); // WD EDIT END PopulateTutorial(tutorialList); diff --git a/Content.Client/White/Rules/RulesWikiSection.xaml.cs b/Content.Client/White/Rules/RulesWikiSection.xaml.cs index aec53b0a46..5305ff43d7 100644 --- a/Content.Client/White/Rules/RulesWikiSection.xaml.cs +++ b/Content.Client/White/Rules/RulesWikiSection.xaml.cs @@ -1,14 +1,22 @@ -using Robust.Client.AutoGenerated; +using Content.Shared.White; +using Robust.Client.AutoGenerated; +using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.XAML; +using Robust.Shared.Configuration; namespace Content.Client.White.Rules; [GenerateTypedNameReferences] public sealed partial class RulesWikiSection : BoxContainer { + [Dependency] private readonly IUriOpener _uri = default!; + [Dependency] private readonly IConfigurationManager _cfg = default!; + public RulesWikiSection() { RobustXamlLoader.Load(this); + IoCManager.InjectDependencies(this); + RulesButton.OnPressed += _ => _uri.OpenUri(_cfg.GetCVar(WhiteCVars.RulesWiki)); } }