1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-30 06:03:22 +08:00

Fix chat not appearing at ranking

This commit is contained in:
Dean Herbert 2018-11-17 15:31:03 +09:00
parent aebece3d89
commit 49e155c2c0

View File

@ -86,6 +86,7 @@ namespace osu.Game.Tournament.Screens.Gameplay
chat = new MatchChatDisplay chat = new MatchChatDisplay
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Y = 100,
Size = new Vector2(0.45f, 120), Size = new Vector2(0.45f, 120),
Margin = new MarginPadding(10), Margin = new MarginPadding(10),
Anchor = Anchor.BottomCentre, Anchor = Anchor.BottomCentre,
@ -137,26 +138,34 @@ namespace osu.Game.Tournament.Screens.Gameplay
scheduledBarContract?.Cancel(); scheduledBarContract?.Cancel();
void expand()
{
chat.FadeOut(200);
chat.MoveToY(100, 500, Easing.In);
using (SongBar.BeginDelayedSequence(300, true))
SongBar.Expanded = true;
}
void contract()
{
SongBar.Expanded = false;
using (chat.BeginDelayedSequence(500))
{
chat.FadeIn(300);
chat.MoveToY(0, 500, Easing.OutQuint);
}
}
switch (state) switch (state)
{ {
case TourneyState.Idle: case TourneyState.Idle:
// show chat contract();
SongBar.Expanded = false;
using (chat.BeginDelayedSequence(500))
{
chat.FadeIn(300);
chat.MoveToY(100).MoveToY(0, 500, Easing.OutQuint);
}
break; break;
case TourneyState.Ranking: case TourneyState.Ranking:
scheduledBarContract = Scheduler.AddDelayed(() => SongBar.Expanded = false, 15000); scheduledBarContract = Scheduler.AddDelayed(contract, 10000);
break; break;
default: default:
chat.FadeOut(200); expand();
chat.MoveToY(100, 500, Easing.In);
using (SongBar.BeginDelayedSequence(300, true))
SongBar.Expanded = true;
break; break;
} }
} }