mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Only bounce and flash notification count when increasing
This commit is contained in:
@ -59,17 +59,28 @@ namespace osu.Game.Overlays.Toolbar
|
||||
|
||||
private class CountCircle : CompositeDrawable
|
||||
{
|
||||
private readonly OsuSpriteText count;
|
||||
private readonly OsuSpriteText countText;
|
||||
private readonly Circle circle;
|
||||
|
||||
private int count;
|
||||
|
||||
public int Count
|
||||
{
|
||||
get { return count; }
|
||||
set
|
||||
{
|
||||
count.Text = value.ToString("#,0");
|
||||
if (count == value)
|
||||
return;
|
||||
|
||||
if (value > count)
|
||||
{
|
||||
circle.FlashColour(Color4.White, 600, Easing.OutQuint);
|
||||
this.ScaleTo(1.1f).Then().ScaleTo(1, 600, Easing.OutElastic);
|
||||
}
|
||||
|
||||
count = value;
|
||||
countText.Text = value.ToString("#,0");
|
||||
}
|
||||
}
|
||||
|
||||
public CountCircle()
|
||||
@ -83,7 +94,7 @@ namespace osu.Game.Overlays.Toolbar
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = Color4.Red
|
||||
},
|
||||
count = new OsuSpriteText
|
||||
countText = new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
|
Reference in New Issue
Block a user