mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 07:33:15 +08: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;
|
bgProgress.Current.Value = 0.75f;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int displayVolumeInt;
|
private int? displayVolumeInt;
|
||||||
|
|
||||||
private double displayVolume;
|
private double displayVolume;
|
||||||
|
|
||||||
@ -200,9 +200,6 @@ namespace osu.Game.Overlays.Volume
|
|||||||
get => displayVolume;
|
get => displayVolume;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (value == displayVolume)
|
|
||||||
return;
|
|
||||||
|
|
||||||
displayVolume = value;
|
displayVolume = value;
|
||||||
|
|
||||||
int intValue = (int)Math.Round(displayVolume * 100);
|
int intValue = (int)Math.Round(displayVolume * 100);
|
||||||
@ -218,7 +215,7 @@ namespace osu.Game.Overlays.Volume
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
maxGlow.EffectColour = Color4.Transparent;
|
maxGlow.EffectColour = Color4.Transparent;
|
||||||
text.Text = displayVolumeInt.ToString(CultureInfo.CurrentCulture);
|
text.Text = intValue.ToString(CultureInfo.CurrentCulture);
|
||||||
}
|
}
|
||||||
|
|
||||||
volumeCircle.Current.Value = displayVolume * 0.75f;
|
volumeCircle.Current.Value = displayVolume * 0.75f;
|
||||||
|
Loading…
Reference in New Issue
Block a user