mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Merge branch 'master' into osu-fontusage
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
|
||||
using System;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Colour;
|
||||
@ -69,10 +69,10 @@ namespace osu.Game.Overlays.Volume
|
||||
}
|
||||
});
|
||||
|
||||
Current.ValueChanged += newValue =>
|
||||
Current.ValueChanged += muted =>
|
||||
{
|
||||
icon.Icon = newValue ? FontAwesome.fa_volume_off : FontAwesome.fa_volume_up;
|
||||
icon.Margin = new MarginPadding { Left = newValue ? width / 2 - 15 : width / 2 - 10 }; //Magic numbers to line up both icons because they're different widths
|
||||
icon.Icon = muted.NewValue ? FontAwesome.fa_volume_off : FontAwesome.fa_volume_up;
|
||||
icon.Margin = new MarginPadding { Left = muted.NewValue ? width / 2 - 15 : width / 2 - 10 }; //Magic numbers to line up both icons because they're different widths
|
||||
};
|
||||
Current.TriggerChange();
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
@ -174,10 +174,10 @@ namespace osu.Game.Overlays.Volume
|
||||
}
|
||||
}
|
||||
};
|
||||
Bindable.ValueChanged += newVolume =>
|
||||
Bindable.ValueChanged += volume =>
|
||||
{
|
||||
this.TransformTo("DisplayVolume",
|
||||
newVolume,
|
||||
volume.NewValue,
|
||||
400,
|
||||
Easing.OutQuint);
|
||||
};
|
||||
@ -217,7 +217,7 @@ namespace osu.Game.Overlays.Volume
|
||||
|
||||
public double Volume
|
||||
{
|
||||
get => Bindable;
|
||||
get => Bindable.Value;
|
||||
private set => Bindable.Value = value;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user