mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
KeyCounter visibility
This commit is contained in:
@ -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.
|
||||
|
Reference in New Issue
Block a user