mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Make toolbar buttons more independent logic-wise.
Also adds visual toggle state for toggleable buttons.
This commit is contained in:
23
osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs
Normal file
23
osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs
Normal file
@ -0,0 +1,23 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Game.Graphics;
|
||||
|
||||
namespace osu.Game.Overlays.Toolbar
|
||||
{
|
||||
class ToolbarMusicButton : ToolbarToggleButton
|
||||
{
|
||||
public ToolbarMusicButton()
|
||||
{
|
||||
Icon = FontAwesome.fa_music;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(MusicController music)
|
||||
{
|
||||
StateContainer = music;
|
||||
Action = music.ToggleVisibility;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user