diff --git a/osu.Game/Overlays/Settings/Sections/Input/TabletSettings.cs b/osu.Game/Overlays/Settings/Sections/Input/TabletSettings.cs index 6107fed8e8..aeae81a998 100644 --- a/osu.Game/Overlays/Settings/Sections/Input/TabletSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Input/TabletSettings.cs @@ -345,14 +345,14 @@ namespace osu.Game.Overlays.Settings.Sections.Input private partial class NoTabletMessage : CompositeDrawable { - private readonly Bindable currentLanguage = new Bindable(); + private IBindable noTabletDetectedText = new Bindable(); private LinkFlowContainer linkContainer; [Resolved] private LocalisationManager localisation { get; set; } [BackgroundDependencyLoader] - private void load(OsuGameBase game, OsuColour colours, OverlayColourProvider colourProvider) + private void load(OsuColour colours, OverlayColourProvider colourProvider) { RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; @@ -406,26 +406,23 @@ namespace osu.Game.Overlays.Settings.Sections.Input }, }; - if (game != null) - currentLanguage.BindTo(game.CurrentLanguage); + const string url = @"https://opentabletdriver.net/Wiki/FAQ/General"; + noTabletDetectedText = localisation.GetLocalisedBindableString(TabletSettingsStrings.NoTabletDetectedDescription(url)); } protected override void LoadComplete() { base.LoadComplete(); - currentLanguage.BindValueChanged(_ => - // schedule required because `LocalisationManager` won't have new language set correctly yet. - Schedule(() => - { - linkContainer.Clear(); - linkContainer.NewLine(); + noTabletDetectedText.BindValueChanged(_ => + { + linkContainer.Clear(); + linkContainer.NewLine(); - const string url = @"https://opentabletdriver.net/Wiki/FAQ/General"; - var formattedSource = MessageFormatter.FormatText(localisation.GetLocalisedString(TabletSettingsStrings.NoTabletDetectedDescription(url))); + var formattedSource = MessageFormatter.FormatText(noTabletDetectedText.Value); - linkContainer.AddLinks(formattedSource.Text, formattedSource.Links); - }), true); + linkContainer.AddLinks(formattedSource.Text, formattedSource.Links); + }, true); } } }