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

@ -12,7 +12,6 @@ using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Input;
using osu.Game.Configuration;
using System;
namespace osu.Game.Graphics.Cursor
{
@ -116,14 +115,9 @@ namespace osu.Game.Graphics.Cursor
};
cursorScale = config.GetBindable<double>(OsuConfig.GameplayCursorSize);
cursorScale.ValueChanged += scaleChanged;
cursorScale.ValueChanged += newScale => cursorContainer.Scale = new Vector2((float)cursorScale);
cursorScale.TriggerChange();
}
private void scaleChanged(object sender, EventArgs e)
{
cursorContainer.Scale = new Vector2((float)cursorScale);
}
}
}
}

View File

@ -131,14 +131,9 @@ namespace osu.Game.Graphics.Cursor
};
cursorScale = config.GetBindable<double>(OsuConfig.MenuCursorSize);
cursorScale.ValueChanged += scaleChanged;
cursorScale.ValueChanged += newScale => cursorContainer.Scale = new Vector2((float)newScale);
cursorScale.TriggerChange();
}
private void scaleChanged(object sender, EventArgs e)
{
cursorContainer.Scale = new Vector2((float)cursorScale);
}
}
}
}

View File

@ -1,7 +1,6 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Audio.Sample;
@ -86,9 +85,9 @@ namespace osu.Game.Graphics.UserInterface
};
}
private void bindableValueChanged(object sender, EventArgs e)
private void bindableValueChanged(bool isChecked)
{
State = bindable.Value ? CheckboxState.Checked : CheckboxState.Unchecked;
State = isChecked ? CheckboxState.Checked : CheckboxState.Unchecked;
}
protected override void Dispose(bool isDisposing)

View File

@ -98,13 +98,10 @@ namespace osu.Game.Graphics.UserInterface
DisplayedCount = Current;
Current.ValueChanged += currentChanged;
}
private void currentChanged(object sender, EventArgs e)
{
if (IsLoaded)
TransformCount(displayedCount, Current);
Current.ValueChanged += newValue =>
{
if (IsLoaded) TransformCount(displayedCount, newValue);
};
}
protected override void LoadComplete()

View File

@ -1,7 +1,6 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Input;
@ -19,7 +18,7 @@ namespace osu.Game.Graphics.UserInterface.Volume
protected override bool HideOnEscape => false;
private void volumeChanged(object sender, EventArgs e)
private void volumeChanged(double newVolume)
{
Show();
schedulePopOut();