Refactor volume control to load asynchronously.

This commit is contained in:
Dean Herbert
2016-11-23 16:12:21 +09:00
parent 0c841cffdd
commit 20ae8df2bd
2 changed files with 26 additions and 21 deletions

View File

@ -13,11 +13,10 @@ namespace osu.Game.Graphics.UserInterface.Volume
internal class VolumeMeter : Container
{
private Box meterFill;
private BindableDouble volume;
public BindableDouble Bindable;
public VolumeMeter(string meterName, BindableDouble volume)
public VolumeMeter(string meterName)
{
this.volume = volume;
Size = new Vector2(40, 180);
Children = new Drawable[]
{
@ -65,10 +64,10 @@ namespace osu.Game.Graphics.UserInterface.Volume
public double Volume
{
get { return volume.Value; }
get { return Bindable.Value; }
private set
{
volume.Value = value;
Bindable.Value = value;
updateFill();
}
}