From 4cdf4b223c1c0141ca7627096386dba16d26655b Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Sun, 2 Feb 2020 18:47:12 +0300 Subject: [PATCH] Rename to alwaysShow and add XMLDoc --- osu.Game/Screens/Play/KeyCounterDisplay.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/osu.Game/Screens/Play/KeyCounterDisplay.cs b/osu.Game/Screens/Play/KeyCounterDisplay.cs index b03f663371..b5d8c99e67 100644 --- a/osu.Game/Screens/Play/KeyCounterDisplay.cs +++ b/osu.Game/Screens/Play/KeyCounterDisplay.cs @@ -19,8 +19,13 @@ namespace osu.Game.Screens.Play private const int duration = 100; private const double key_fade_time = 80; + /// + /// Whether to always show key counter regardless of . + /// This is bound to configuration setting bindable. + /// + private readonly Bindable alwaysShow = new Bindable(); + public readonly Bindable Visible = new Bindable(true); - protected readonly Bindable ConfigVisibility = new Bindable(); protected readonly FillFlowContainer KeyFlow; @@ -51,7 +56,7 @@ namespace osu.Game.Screens.Play [BackgroundDependencyLoader] private void load(OsuConfigManager config) { - config.BindWith(OsuSetting.KeyOverlay, ConfigVisibility); + config.BindWith(OsuSetting.KeyOverlay, alwaysShow); } protected override void LoadComplete() @@ -59,7 +64,7 @@ namespace osu.Game.Screens.Play base.LoadComplete(); Visible.BindValueChanged(_ => updateVisibility()); - ConfigVisibility.BindValueChanged(_ => updateVisibility(), true); + alwaysShow.BindValueChanged(_ => updateVisibility(), true); } private bool isCounting = true;