mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Expose unread notification count
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user