mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 07:32:55 +08: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),
|
Spacing = new Vector2(15, 0),
|
||||||
Children = new Drawable[]
|
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"),
|
volumeMeterMaster = new VolumeMeter("Master"),
|
||||||
volumeMeterEffect = new VolumeMeter("Effects"),
|
volumeMeterEffect = new VolumeMeter("Effects"),
|
||||||
volumeMeterMusic = new VolumeMeter("Music")
|
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()
|
protected override void LoadComplete()
|
||||||
|
Loading…
Reference in New Issue
Block a user