mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 17:29:56 +09:00
Make transition logic a bit more sane.
This commit is contained in:
@ -8,6 +8,7 @@ using osu.Framework.Extensions;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Primitives;
|
using osu.Framework.Graphics.Primitives;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Framework.Graphics.Transforms;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
@ -54,16 +55,18 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private const float transition_length = 500;
|
||||||
|
|
||||||
private void fadeActive()
|
private void fadeActive()
|
||||||
{
|
{
|
||||||
box.FadeIn(300);
|
box.FadeIn(transition_length, EasingTypes.OutQuint);
|
||||||
text.FadeColour(Color4.White, 300);
|
text.FadeColour(Color4.White, transition_length, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fadeInactive()
|
private void fadeInactive()
|
||||||
{
|
{
|
||||||
box.FadeOut(300);
|
box.FadeOut(transition_length, EasingTypes.OutQuint);
|
||||||
text.FadeColour(AccentColour, 300);
|
text.FadeColour(AccentColour, transition_length, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnHover(InputState state)
|
protected override bool OnHover(InputState state)
|
||||||
|
Reference in New Issue
Block a user