mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 15:05:34 +08:00
Tidy up state variables
This commit is contained in:
parent
60999e83e0
commit
ddab3c6d80
@ -163,19 +163,17 @@ namespace osu.Game.Overlays.Chat.ChannelList
|
|||||||
|
|
||||||
private void updateState()
|
private void updateState()
|
||||||
{
|
{
|
||||||
if (showSelected)
|
bool selected = selectedChannel.Value == Channel && !SelectorActive.Value;
|
||||||
|
|
||||||
|
if (selected)
|
||||||
selectBox.FadeIn(300, Easing.OutQuint);
|
selectBox.FadeIn(300, Easing.OutQuint);
|
||||||
else
|
else
|
||||||
selectBox.FadeOut(200, Easing.OutQuint);
|
selectBox.FadeOut(200, Easing.OutQuint);
|
||||||
|
|
||||||
if (showUnread || showSelected)
|
if (Unread.Value || selected)
|
||||||
text.FadeColour(colourProvider.Content1, 300, Easing.OutQuint);
|
text.FadeColour(colourProvider.Content1, 300, Easing.OutQuint);
|
||||||
else
|
else
|
||||||
text.FadeColour(colourProvider.Light3, 200, Easing.OutQuint);
|
text.FadeColour(colourProvider.Light3, 200, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool showUnread => Unread.Value;
|
|
||||||
|
|
||||||
private bool showSelected => selectedChannel.Value == Channel && !SelectorActive.Value;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user