mirror of
https://github.com/ppy/osu.git
synced 2025-03-23 18:10:01 +08:00
Transition code cleanup
This commit is contained in:
parent
d29ebb139f
commit
21e900df73
@ -164,10 +164,20 @@ namespace osu.Game.Overlays.Chat
|
||||
|
||||
private void updateColour(bool joined)
|
||||
{
|
||||
joinedCheckmark.FadeTo(joined ? 1f : 0f, transition_duration);
|
||||
topic.FadeTo(joined ? 0.8f : 1f, transition_duration);
|
||||
topic.FadeColour(joined ? Color4.White : topicColour ?? Color4.White, transition_duration);
|
||||
FadeColour(joined ? joinedColour ?? Color4.White : Color4.White, transition_duration);
|
||||
if (joined)
|
||||
{
|
||||
joinedCheckmark.FadeTo(1f, transition_duration);
|
||||
topic.FadeTo(0.8f, transition_duration);
|
||||
topic.FadeColour(Color4.White, transition_duration);
|
||||
FadeColour(joinedColour ?? Color4.White, transition_duration);
|
||||
}
|
||||
else
|
||||
{
|
||||
joinedCheckmark.FadeTo(0f, transition_duration);
|
||||
topic.FadeTo(1f, transition_duration);
|
||||
topic.FadeColour(topicColour ?? Color4.White, transition_duration);
|
||||
FadeColour(Color4.White, transition_duration);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,12 +17,12 @@ namespace osu.Game.Overlays.Chat
|
||||
|
||||
public readonly FillFlowContainer<ChannelListItem> ChannelFlow;
|
||||
|
||||
public IEnumerable<IFilterable> FilterableChildren => ChannelFlow.Children.OfType<ChannelListItem>();
|
||||
public string[] FilterTerms => new[] { Header };
|
||||
public bool MatchingCurrentFilter
|
||||
{
|
||||
public IEnumerable<IFilterable> FilterableChildren => ChannelFlow.Children.OfType<ChannelListItem>();
|
||||
public string[] FilterTerms => new[] { Header };
|
||||
public bool MatchingCurrentFilter
|
||||
{
|
||||
set
|
||||
{
|
||||
{
|
||||
FadeTo(value ? 1f : 0f, 100);
|
||||
}
|
||||
}
|
||||
@ -38,7 +38,6 @@ namespace osu.Game.Overlays.Chat
|
||||
set { ChannelFlow.Children = value.Select(c => new ChannelListItem { Channel = c }); }
|
||||
}
|
||||
|
||||
|
||||
public ChannelSection()
|
||||
{
|
||||
RelativeSizeAxes = Axes.X;
|
||||
|
Loading…
x
Reference in New Issue
Block a user