mirror of
https://github.com/ppy/osu.git
synced 2025-02-23 02:25:12 +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
|
public partial class TestGameplayButton : OsuButton
|
||||||
{
|
{
|
||||||
|
[Resolved]
|
||||||
|
private OsuColour colours { get; set; } = null!;
|
||||||
|
|
||||||
protected override SpriteText CreateText() => new OsuSpriteText
|
protected override SpriteText CreateText() => new OsuSpriteText
|
||||||
{
|
{
|
||||||
Depth = -1,
|
Depth = -1,
|
||||||
@ -25,7 +28,7 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary
|
|||||||
};
|
};
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours, OverlayColourProvider colourProvider)
|
private void load(OverlayColourProvider colourProvider)
|
||||||
{
|
{
|
||||||
BackgroundColour = colours.Orange1;
|
BackgroundColour = colours.Orange1;
|
||||||
SpriteText.Colour = colourProvider.Background6;
|
SpriteText.Colour = colourProvider.Background6;
|
||||||
@ -37,13 +40,15 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary
|
|||||||
|
|
||||||
protected override bool OnMouseDown(MouseDownEvent e)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnMouseUp(MouseUpEvent e)
|
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