Expose unread notification count

This commit is contained in:
Dean Herbert
2017-12-26 01:50:05 +09:00
parent bb33d0211a
commit 1fc240f6c5
3 changed files with 37 additions and 16 deletions

View File

@ -4,6 +4,7 @@
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.MathUtils;
using osu.Game.Overlays;
using osu.Game.Overlays.Notifications;
@ -25,6 +26,12 @@ namespace osu.Game.Tests.Visual
Origin = Anchor.TopRight
});
SpriteText displayedCount = new SpriteText();
Content.Add(displayedCount);
manager.UnreadCount.ValueChanged += count => { displayedCount.Text = $"displayed count: {count}"; };
AddStep(@"toggle", manager.ToggleVisibility);
AddStep(@"simple #1", sendHelloNotification);
AddStep(@"simple #2", sendAmazingNotification);