mirror of
https://github.com/ppy/osu
synced 2024-12-24 15:53:37 +00:00
Inline changing mute icon properties with object creation
This commit is contained in:
parent
8471a579e0
commit
18ff57fdf9
@ -38,23 +38,24 @@ namespace osu.Game.Graphics.UserInterface.Volume
|
||||
Spacing = new Vector2(15, 0),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
muteIcon = new IconButton(),
|
||||
muteIcon = new IconButton
|
||||
{
|
||||
Icon = FontAwesome.fa_volume_up,
|
||||
Scale = new Vector2(2.0f),
|
||||
Action = () =>
|
||||
{
|
||||
if (IsMuted)
|
||||
Unmute();
|
||||
else
|
||||
Mute();
|
||||
},
|
||||
},
|
||||
volumeMeterMaster = new VolumeMeter("Master"),
|
||||
volumeMeterEffect = new VolumeMeter("Effects"),
|
||||
volumeMeterMusic = new VolumeMeter("Music")
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
muteIcon.Icon = FontAwesome.fa_volume_up;
|
||||
muteIcon.Scale = new Vector2(2.0f);
|
||||
muteIcon.Action = () =>
|
||||
{
|
||||
if (IsMuted)
|
||||
Unmute();
|
||||
else
|
||||
Mute();
|
||||
};
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
|
Loading…
Reference in New Issue
Block a user