Update bindables.

# Conflicts:
#	osu.Desktop.VisualTests/Tests/TestCaseResults.cs
#	osu.Game/Screens/Ranking/ResultModeButton.cs
#	osu.Game/Screens/Ranking/Results.cs
This commit is contained in:
Dean Herbert
2017-04-03 19:34:00 +09:00
parent f6303d55ec
commit 7c74951454
24 changed files with 57 additions and 130 deletions

View File

@ -66,12 +66,7 @@ namespace osu.Game.Modes.UI
TextSize = 80;
Current.ValueChanged += comboChanged;
}
private void comboChanged(object sender, System.EventArgs e)
{
updateCount(Current.Value == 0);
Current.ValueChanged += newValue => updateCount(newValue == 0);
}
protected override void LoadComplete()

View File

@ -16,7 +16,7 @@ namespace osu.Game.Modes.UI
protected HealthDisplay()
{
Current.ValueChanged += (s, e) => SetHealth((float)Current);
Current.ValueChanged += newValue => SetHealth((float)newValue);
}
protected abstract void SetHealth(float value);

View File

@ -8,7 +8,6 @@ using osu.Framework.Graphics.Containers;
using osu.Game.Configuration;
using osu.Game.Graphics.UserInterface;
using osu.Game.Screens.Play;
using System;
using osu.Game.Modes.Scoring;
namespace osu.Game.Modes.UI
@ -47,18 +46,16 @@ namespace osu.Game.Modes.UI
private void load(OsuConfigManager config)
{
showKeyCounter = config.GetBindable<bool>(OsuConfig.KeyOverlay);
showKeyCounter.ValueChanged += visibilityChanged;
showKeyCounter.ValueChanged += visibility =>
{
if (visibility)
KeyCounter.Show();
else
KeyCounter.Hide();
};
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.