mirror of
https://github.com/ppy/osu.git
synced 2025-02-22 08:52:55 +08:00
Add basic brighten animation instead
This commit is contained in:
parent
1fa8d53232
commit
b9ed217308
@ -15,6 +15,9 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary
|
||||
{
|
||||
public partial class TestGameplayButton : OsuButton
|
||||
{
|
||||
[Resolved]
|
||||
private OsuColour colours { get; set; } = null!;
|
||||
|
||||
protected override SpriteText CreateText() => new OsuSpriteText
|
||||
{
|
||||
Depth = -1,
|
||||
@ -25,7 +28,7 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary
|
||||
};
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours, OverlayColourProvider colourProvider)
|
||||
private void load(OverlayColourProvider colourProvider)
|
||||
{
|
||||
BackgroundColour = colours.Orange1;
|
||||
SpriteText.Colour = colourProvider.Background6;
|
||||
@ -37,13 +40,15 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary
|
||||
|
||||
protected override bool OnMouseDown(MouseDownEvent e)
|
||||
{
|
||||
// block scale animation
|
||||
Background.FadeColour(colours.Orange0, 500, Easing.OutQuint);
|
||||
// don't call base in order to block scale animation
|
||||
return false;
|
||||
}
|
||||
|
||||
protected override void OnMouseUp(MouseUpEvent e)
|
||||
{
|
||||
// block scale animation
|
||||
Background.FadeColour(colours.Orange1, 300, Easing.OutQuint);
|
||||
// don't call base in order to block scale animation
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user