1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 13:33:03 +08:00

Use VolumeMute icon for mute button

This commit is contained in:
Joehu 2019-05-12 09:30:43 -07:00
parent dc486579fb
commit c119a6a135

View File

@ -64,16 +64,15 @@ namespace osu.Game.Overlays.Volume
}, },
icon = new SpriteIcon icon = new SpriteIcon
{ {
Anchor = Anchor.CentreLeft, Anchor = Anchor.Centre,
Origin = Anchor.CentreLeft, Origin = Anchor.Centre,
Size = new Vector2(20), Size = new Vector2(20),
} }
}); });
Current.ValueChanged += muted => Current.ValueChanged += muted =>
{ {
icon.Icon = muted.NewValue ? FontAwesome.Solid.VolumeOff : FontAwesome.Solid.VolumeUp; icon.Icon = muted.NewValue ? FontAwesome.Solid.VolumeMute : FontAwesome.Solid.VolumeUp;
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(); Current.TriggerChange();
} }