mirror of
https://github.com/ppy/osu
synced 2025-02-04 12:21:58 +00:00
Fix volume metre not correctly showing volume when initially zero
Closes https://github.com/ppy/osu/issues/13761.
This commit is contained in:
parent
49090a0d1b
commit
149a200f34
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user