1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 16:02:55 +08:00

Expose TRANSITION_LENGTH from tab control

This commit is contained in:
Salman Ahmed 2024-03-07 08:20:20 +03:00
parent 0881e7c8c1
commit 336a6180e5

View File

@ -116,18 +116,18 @@ namespace osu.Game.Graphics.UserInterface
} }
} }
private const float transition_length = 500; protected const float TRANSITION_LENGTH = 500;
protected void FadeHovered() protected virtual void FadeHovered()
{ {
Bar.FadeIn(transition_length, Easing.OutQuint); Bar.FadeIn(TRANSITION_LENGTH, Easing.OutQuint);
Text.FadeColour(Color4.White, transition_length, Easing.OutQuint); Text.FadeColour(Color4.White, TRANSITION_LENGTH, Easing.OutQuint);
} }
protected void FadeUnhovered() protected virtual void FadeUnhovered()
{ {
Bar.FadeTo(IsHovered ? 1 : 0, transition_length, Easing.OutQuint); Bar.FadeTo(IsHovered ? 1 : 0, TRANSITION_LENGTH, Easing.OutQuint);
Text.FadeColour(IsHovered ? Color4.White : AccentColour, transition_length, Easing.OutQuint); Text.FadeColour(IsHovered ? Color4.White : AccentColour, TRANSITION_LENGTH, Easing.OutQuint);
} }
protected override bool OnHover(HoverEvent e) protected override bool OnHover(HoverEvent e)