mirror of
https://github.com/ppy/osu.git
synced 2025-03-19 07:47:19 +08:00
KeyCounter visibility
This commit is contained in:
parent
327300e9a7
commit
cc92459ee1
osu.Game
@ -33,6 +33,8 @@ namespace osu.Game.Configuration
|
||||
Set(OsuConfig.SnakingOutSliders, false);
|
||||
|
||||
Set(OsuConfig.MenuParallax, true);
|
||||
|
||||
Set(OsuConfig.KeyOverlay, false);
|
||||
//todo: implement all settings below this line (remove the Disabled set when doing so).
|
||||
|
||||
Set(OsuConfig.MouseSpeed, 1.0).Disabled = true;
|
||||
@ -80,7 +82,6 @@ namespace osu.Game.Configuration
|
||||
Set(OsuConfig.IgnoreBeatmapSamples, false).Disabled = true;
|
||||
Set(OsuConfig.IgnoreBeatmapSkins, false).Disabled = true;
|
||||
Set(OsuConfig.IgnoreList, string.Empty).Disabled = true;
|
||||
Set(OsuConfig.KeyOverlay, false).Disabled = true;
|
||||
Set(OsuConfig.Language, @"unknown").Disabled = true;
|
||||
Set(OsuConfig.AllowNowPlayingHighlights, false).Disabled = true;
|
||||
Set(OsuConfig.LastVersion, string.Empty).Disabled = true;
|
||||
|
@ -9,6 +9,9 @@ using osu.Game.Modes.Objects;
|
||||
using OpenTK;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
using osu.Game.Screens.Play;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Framework.Configuration;
|
||||
|
||||
namespace osu.Game.Modes.UI
|
||||
{
|
||||
@ -21,6 +24,8 @@ namespace osu.Game.Modes.UI
|
||||
public HealthDisplay HealthDisplay;
|
||||
public Score Score { get; set; }
|
||||
|
||||
private Bindable<bool> showKeyCounter;
|
||||
|
||||
protected abstract KeyCounterCollection CreateKeyCounter();
|
||||
protected abstract ComboCounter CreateComboCounter();
|
||||
protected abstract PercentageCounter CreateAccuracyCounter();
|
||||
@ -58,6 +63,25 @@ namespace osu.Game.Modes.UI
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config)
|
||||
{
|
||||
showKeyCounter = config.GetBindable<bool>(OsuConfig.KeyOverlay);
|
||||
|
||||
if (showKeyCounter)
|
||||
KeyCounter.Show();
|
||||
else KeyCounter.Hide();
|
||||
|
||||
showKeyCounter.ValueChanged += visibilityChanged;
|
||||
}
|
||||
|
||||
private void visibilityChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (showKeyCounter)
|
||||
KeyCounter.Show();
|
||||
else KeyCounter.Hide();
|
||||
}
|
||||
|
||||
public void BindProcessor(ScoreProcessor processor)
|
||||
{
|
||||
//bind processor bindables to combocounter, score display etc.
|
||||
|
Loading…
x
Reference in New Issue
Block a user