1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 10:47:25 +08:00

Add visual states for ChannelSelectorTabItem

This commit is contained in:
DrabWeb 2017-06-02 01:41:55 -03:00
parent 1fa70167c2
commit d81ff9cbc2

View File

@ -211,6 +211,7 @@ namespace osu.Game.Overlays.Chat
set
{
activeBindable.Value = !activeBindable.Value;
selectorUpdateState();
base.Active = false;
}
}
@ -235,6 +236,26 @@ namespace osu.Game.Overlays.Chat
backgroundInactive = colour.Gray2;
backgroundActive = colour.Gray3;
}
protected override void LoadComplete()
{
base.LoadComplete();
selectorUpdateState();
}
protected override void OnHoverLost(InputState state)
{
selectorUpdateState();
}
private void selectorUpdateState()
{
if (activeBindable.Value)
fadeActive();
else
fadeInactive();
}
}
}
}