mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 00:53:56 +09:00
Merge pull request #1759 from peppy/quieter-notifications
Fix notification read lamp and notification count
This commit is contained in:
@ -261,4 +261,4 @@ namespace osu.Game.Overlays.Notifications
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ namespace osu.Game.Overlays.Notifications
|
|||||||
|
|
||||||
protected virtual void Completed()
|
protected virtual void Completed()
|
||||||
{
|
{
|
||||||
Expire();
|
base.Close();
|
||||||
CompletionTarget?.Invoke(CreateCompletionNotification());
|
CompletionTarget?.Invoke(CreateCompletionNotification());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,8 +83,10 @@ namespace osu.Game.Overlays.Notifications
|
|||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
|
if (value == base.Read) return;
|
||||||
|
|
||||||
base.Read = value;
|
base.Read = value;
|
||||||
Light.FadeTo(value ? 1 : 0, 100);
|
Light.FadeTo(value ? 0 : 1, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,16 +59,27 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
|
|
||||||
private class CountCircle : CompositeDrawable
|
private class CountCircle : CompositeDrawable
|
||||||
{
|
{
|
||||||
private readonly OsuSpriteText count;
|
private readonly OsuSpriteText countText;
|
||||||
private readonly Circle circle;
|
private readonly Circle circle;
|
||||||
|
|
||||||
|
private int count;
|
||||||
|
|
||||||
public int Count
|
public int Count
|
||||||
{
|
{
|
||||||
|
get { return count; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
count.Text = value.ToString("#,0");
|
if (count == value)
|
||||||
circle.FlashColour(Color4.White, 600, Easing.OutQuint);
|
return;
|
||||||
this.ScaleTo(1.1f).Then().ScaleTo(1, 600, Easing.OutElastic);
|
|
||||||
|
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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,7 +94,7 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = Color4.Red
|
Colour = Color4.Red
|
||||||
},
|
},
|
||||||
count = new OsuSpriteText
|
countText = new OsuSpriteText
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
|
Reference in New Issue
Block a user