mirror of
https://github.com/ppy/osu
synced 2025-01-03 04:42:10 +00:00
Use VolumeMute icon for mute button
This commit is contained in:
parent
dc486579fb
commit
c119a6a135
@ -64,16 +64,15 @@ namespace osu.Game.Overlays.Volume
|
||||
},
|
||||
icon = new SpriteIcon
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Size = new Vector2(20),
|
||||
}
|
||||
});
|
||||
|
||||
Current.ValueChanged += muted =>
|
||||
{
|
||||
icon.Icon = muted.NewValue ? FontAwesome.Solid.VolumeOff : 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
|
||||
icon.Icon = muted.NewValue ? FontAwesome.Solid.VolumeMute : FontAwesome.Solid.VolumeUp;
|
||||
};
|
||||
Current.TriggerChange();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user