1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 18:52:55 +08:00

Merge pull request #13765 from peppy/fix-initial-volume-display-when-zero

Fix volume metre not correctly showing volume when initially zero
This commit is contained in:
Bartłomiej Dach 2021-07-04 16:55:24 +02:00 committed by GitHub
commit f3cd0be230
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -191,7 +191,7 @@ namespace osu.Game.Overlays.Volume
bgProgress.Current.Value = 0.75f;
}
private int displayVolumeInt;
private int? displayVolumeInt;
private double displayVolume;
@ -200,9 +200,6 @@ namespace osu.Game.Overlays.Volume
get => displayVolume;
set
{
if (value == displayVolume)
return;
displayVolume = value;
int intValue = (int)Math.Round(displayVolume * 100);
@ -218,7 +215,7 @@ namespace osu.Game.Overlays.Volume
else
{
maxGlow.EffectColour = Color4.Transparent;
text.Text = displayVolumeInt.ToString(CultureInfo.CurrentCulture);
text.Text = intValue.ToString(CultureInfo.CurrentCulture);
}
volumeCircle.Current.Value = displayVolume * 0.75f;