1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 16:12:57 +08:00

Merge pull request #16612 from peppy/log-notifications

Log posted notifications
This commit is contained in:
Dean Herbert 2022-01-26 03:06:33 +09:00 committed by GitHub
commit 342452dabf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 2 deletions

View File

@ -12,6 +12,7 @@ using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Bindables;
using osu.Framework.Localisation;
using osu.Framework.Logging;
using osu.Framework.Threading;
using osu.Game.Graphics;
using osu.Game.Localisation;
@ -118,6 +119,8 @@ namespace osu.Game.Overlays
{
++runningDepth;
Logger.Log($"⚠️ {notification.Text}");
notification.Closed += notificationClosed;
if (notification is IHasCompletionTarget hasCompletionTarget)

View File

@ -11,6 +11,7 @@ using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Events;
using osu.Framework.Localisation;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osuTK;
@ -25,6 +26,8 @@ namespace osu.Game.Overlays.Notifications
/// </summary>
public event Action Closed;
public abstract LocalisableString Text { get; set; }
/// <summary>
/// Whether this notification should forcefully display itself.
/// </summary>

View File

@ -25,7 +25,7 @@ namespace osu.Game.Overlays.Notifications
private LocalisableString text;
public LocalisableString Text
public override LocalisableString Text
{
get => text;
set

View File

@ -18,7 +18,7 @@ namespace osu.Game.Overlays.Notifications
{
private LocalisableString text;
public LocalisableString Text
public override LocalisableString Text
{
get => text;
set