1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-22 06:07:20 +08:00

Merge pull request #414 from EVAST9919/input_overlay

KeyCounter visibility
This commit is contained in:
Dean Herbert 2017-03-01 21:50:13 +09:00 committed by GitHub
commit b3a411d8c3
2 changed files with 23 additions and 1 deletions

View File

@ -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;

View File

@ -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,22 @@ namespace osu.Game.Modes.UI
};
}
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
showKeyCounter = config.GetBindable<bool>(OsuConfig.KeyOverlay);
showKeyCounter.ValueChanged += visibilityChanged;
showKeyCounter.TriggerChange();
}
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.