1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 08:13:31 +08:00

Speed up animations

This commit is contained in:
DrabWeb 2017-06-01 06:10:26 -03:00
parent a707d63647
commit fad5b4ca9d
2 changed files with 7 additions and 5 deletions

View File

@ -154,7 +154,7 @@ namespace osu.Game.Overlays.Chat
protected override bool OnHover(InputState state) protected override bool OnHover(InputState state)
{ {
if (!channel.Joined.Value) if (!channel.Joined.Value)
name.FadeColour(hoverColour, transition_duration); name.FadeColour(hoverColour, 50, EasingTypes.OutQuint);
return base.OnHover(state); return base.OnHover(state);
} }

View File

@ -23,6 +23,8 @@ namespace osu.Game.Overlays.Chat
{ {
public static readonly float WIDTH_PADDING = 170; public static readonly float WIDTH_PADDING = 170;
private const float transition_duration = 500;
private readonly Box bg; private readonly Box bg;
private readonly Triangles triangles; private readonly Triangles triangles;
private readonly Box headerBg; private readonly Box headerBg;
@ -157,8 +159,8 @@ namespace osu.Game.Overlays.Chat
{ {
if (Alpha == 0) MoveToY(DrawHeight); if (Alpha == 0) MoveToY(DrawHeight);
FadeIn(100, EasingTypes.OutQuint); FadeIn(transition_duration, EasingTypes.OutQuint);
MoveToY(0, 800, EasingTypes.OutQuint); MoveToY(0, transition_duration, EasingTypes.OutQuint);
search.HoldFocus = true; search.HoldFocus = true;
base.PopIn(); base.PopIn();
@ -166,8 +168,8 @@ namespace osu.Game.Overlays.Chat
protected override void PopOut() protected override void PopOut()
{ {
FadeOut(500, EasingTypes.InQuint); FadeOut(transition_duration, EasingTypes.InSine);
MoveToY(DrawHeight, 500, EasingTypes.In); MoveToY(DrawHeight, transition_duration, EasingTypes.InSine);
search.HoldFocus = false; search.HoldFocus = false;
base.PopOut(); base.PopOut();