From 336a6180e537ba1c205c488cead7c5494446b705 Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Thu, 7 Mar 2024 08:20:20 +0300 Subject: [PATCH] Expose `TRANSITION_LENGTH` from tab control --- osu.Game/Graphics/UserInterface/OsuTabControl.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/OsuTabControl.cs b/osu.Game/Graphics/UserInterface/OsuTabControl.cs index c260c92b43..f24977927f 100644 --- a/osu.Game/Graphics/UserInterface/OsuTabControl.cs +++ b/osu.Game/Graphics/UserInterface/OsuTabControl.cs @@ -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); - Text.FadeColour(Color4.White, transition_length, Easing.OutQuint); + Bar.FadeIn(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); - Text.FadeColour(IsHovered ? Color4.White : AccentColour, transition_length, Easing.OutQuint); + Bar.FadeTo(IsHovered ? 1 : 0, TRANSITION_LENGTH, Easing.OutQuint); + Text.FadeColour(IsHovered ? Color4.White : AccentColour, TRANSITION_LENGTH, Easing.OutQuint); } protected override bool OnHover(HoverEvent e)