mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 20:25:39 +08:00
Rename to AlwaysVisible and add XMLDoc
This commit is contained in:
parent
51ed289c59
commit
4cd4055e7c
@ -85,7 +85,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
AddStep("set keycounter visible false", () =>
|
AddStep("set keycounter visible false", () =>
|
||||||
{
|
{
|
||||||
config.Set<bool>(OsuSetting.KeyOverlay, false);
|
config.Set<bool>(OsuSetting.KeyOverlay, false);
|
||||||
hudOverlay.KeyCounter.Visible.Value = false;
|
hudOverlay.KeyCounter.AlwaysVisible.Value = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
AddStep("set showhud false", () => hudOverlay.ShowHud.Value = false);
|
AddStep("set showhud false", () => hudOverlay.ShowHud.Value = false);
|
||||||
|
@ -19,13 +19,18 @@ namespace osu.Game.Screens.Play
|
|||||||
private const int duration = 100;
|
private const int duration = 100;
|
||||||
private const double key_fade_time = 80;
|
private const double key_fade_time = 80;
|
||||||
|
|
||||||
public readonly Bindable<bool> Visible = new Bindable<bool>(true);
|
|
||||||
private readonly Bindable<bool> configVisibility = new Bindable<bool>();
|
private readonly Bindable<bool> configVisibility = new Bindable<bool>();
|
||||||
|
|
||||||
protected readonly FillFlowContainer<KeyCounter> KeyFlow;
|
protected readonly FillFlowContainer<KeyCounter> KeyFlow;
|
||||||
|
|
||||||
protected override Container<KeyCounter> Content => KeyFlow;
|
protected override Container<KeyCounter> Content => KeyFlow;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether the key counter should be visible regardless of the configuration value.
|
||||||
|
/// This is true by default, but can be changed.
|
||||||
|
/// </summary>
|
||||||
|
public readonly Bindable<bool> AlwaysVisible = new Bindable<bool>(true);
|
||||||
|
|
||||||
public KeyCounterDisplay()
|
public KeyCounterDisplay()
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both;
|
AutoSizeAxes = Axes.Both;
|
||||||
@ -58,7 +63,7 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
Visible.BindValueChanged(_ => updateVisibility());
|
AlwaysVisible.BindValueChanged(_ => updateVisibility());
|
||||||
configVisibility.BindValueChanged(_ => updateVisibility(), true);
|
configVisibility.BindValueChanged(_ => updateVisibility(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -219,7 +219,7 @@ namespace osu.Game.Screens.Play
|
|||||||
IsPaused = { BindTarget = GameplayClockContainer.IsPaused }
|
IsPaused = { BindTarget = GameplayClockContainer.IsPaused }
|
||||||
},
|
},
|
||||||
PlayerSettingsOverlay = { PlaybackSettings = { UserPlaybackRate = { BindTarget = GameplayClockContainer.UserPlaybackRate } } },
|
PlayerSettingsOverlay = { PlaybackSettings = { UserPlaybackRate = { BindTarget = GameplayClockContainer.UserPlaybackRate } } },
|
||||||
KeyCounter = { Visible = { BindTarget = DrawableRuleset.HasReplayLoaded } },
|
KeyCounter = { AlwaysVisible = { BindTarget = DrawableRuleset.HasReplayLoaded } },
|
||||||
RequestSeek = GameplayClockContainer.Seek,
|
RequestSeek = GameplayClockContainer.Seek,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre
|
Origin = Anchor.Centre
|
||||||
|
Loading…
Reference in New Issue
Block a user