mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 20:07:25 +08:00
Improve show/hide animation and add more padding around the crown
This commit is contained in:
parent
69e6c08cc2
commit
aa320c70a7
@ -62,7 +62,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Participants
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
ColumnDimensions = new[]
|
ColumnDimensions = new[]
|
||||||
{
|
{
|
||||||
new Dimension(GridSizeMode.Absolute, 14),
|
new Dimension(GridSizeMode.Absolute, 18),
|
||||||
new Dimension(GridSizeMode.AutoSize),
|
new Dimension(GridSizeMode.AutoSize),
|
||||||
new Dimension()
|
new Dimension()
|
||||||
},
|
},
|
||||||
|
@ -36,6 +36,9 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Participants
|
|||||||
Width = 15;
|
Width = 15;
|
||||||
|
|
||||||
Margin = new MarginPadding { Horizontal = 3 };
|
Margin = new MarginPadding { Horizontal = 3 };
|
||||||
|
|
||||||
|
Alpha = 0;
|
||||||
|
Scale = new Vector2(0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
@ -46,7 +49,6 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Participants
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
CornerRadius = 5,
|
CornerRadius = 5,
|
||||||
Masking = true,
|
Masking = true,
|
||||||
Alpha = 0,
|
|
||||||
Scale = new Vector2(0, 1),
|
Scale = new Vector2(0, 1),
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
@ -104,14 +106,16 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Participants
|
|||||||
|
|
||||||
if (displayedTeam != null)
|
if (displayedTeam != null)
|
||||||
{
|
{
|
||||||
box.FadeIn(duration);
|
|
||||||
box.FadeColour(getColourForTeam(displayedTeam.Value), duration, Easing.OutQuint);
|
box.FadeColour(getColourForTeam(displayedTeam.Value), duration, Easing.OutQuint);
|
||||||
box.ScaleTo(new Vector2(box.Scale.X < 0 ? 1 : -1, 1), duration, Easing.OutQuint);
|
box.ScaleTo(new Vector2(box.Scale.X < 0 ? 1 : -1, 1), duration, Easing.OutQuint);
|
||||||
|
|
||||||
|
this.ScaleTo(Vector2.One, duration, Easing.OutQuint);
|
||||||
|
this.FadeIn(duration);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
box.ScaleTo(new Vector2(0, 1), duration, Easing.OutQuint);
|
this.ScaleTo(new Vector2(0, 1), duration, Easing.OutQuint);
|
||||||
box.FadeOut(duration);
|
this.FadeOut(duration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user