mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Merge remote-tracking branch 'refs/remotes/ppy/master' into news
This commit is contained in:
@ -18,6 +18,7 @@ using osu.Game.Screens.Menu;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Humanizer;
|
||||
using JetBrains.Annotations;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Bindables;
|
||||
@ -63,7 +64,8 @@ namespace osu.Game
|
||||
|
||||
private ChannelManager channelManager;
|
||||
|
||||
private NotificationOverlay notifications;
|
||||
[NotNull]
|
||||
private readonly NotificationOverlay notifications = new NotificationOverlay();
|
||||
|
||||
private NowPlayingOverlay nowPlaying;
|
||||
|
||||
@ -84,7 +86,7 @@ namespace osu.Game
|
||||
|
||||
public virtual Storage GetStorageForStableInstall() => null;
|
||||
|
||||
public float ToolbarOffset => Toolbar.Position.Y + Toolbar.DrawHeight;
|
||||
public float ToolbarOffset => (Toolbar?.Position.Y ?? 0) + (Toolbar?.DrawHeight ?? 0);
|
||||
|
||||
private IdleTracker idleTracker;
|
||||
|
||||
@ -252,7 +254,7 @@ namespace osu.Game
|
||||
case LinkAction.OpenEditorTimestamp:
|
||||
case LinkAction.JoinMultiplayerMatch:
|
||||
case LinkAction.Spectate:
|
||||
waitForReady(() => notifications, _ => notifications?.Post(new SimpleNotification
|
||||
waitForReady(() => notifications, _ => notifications.Post(new SimpleNotification
|
||||
{
|
||||
Text = @"This link type is not yet supported!",
|
||||
Icon = FontAwesome.Solid.LifeRing,
|
||||
@ -538,14 +540,14 @@ namespace osu.Game
|
||||
MenuCursorContainer.CanShowCursor = menuScreen?.CursorVisible ?? false;
|
||||
|
||||
// todo: all archive managers should be able to be looped here.
|
||||
SkinManager.PostNotification = n => notifications?.Post(n);
|
||||
SkinManager.PostNotification = n => notifications.Post(n);
|
||||
SkinManager.GetStableStorage = GetStorageForStableInstall;
|
||||
|
||||
BeatmapManager.PostNotification = n => notifications?.Post(n);
|
||||
BeatmapManager.PostNotification = n => notifications.Post(n);
|
||||
BeatmapManager.GetStableStorage = GetStorageForStableInstall;
|
||||
BeatmapManager.PresentImport = items => PresentBeatmap(items.First());
|
||||
|
||||
ScoreManager.PostNotification = n => notifications?.Post(n);
|
||||
ScoreManager.PostNotification = n => notifications.Post(n);
|
||||
ScoreManager.GetStableStorage = GetStorageForStableInstall;
|
||||
ScoreManager.PresentImport = items => PresentScore(items.First());
|
||||
|
||||
@ -617,12 +619,12 @@ namespace osu.Game
|
||||
|
||||
loadComponentSingleFile(MusicController = new MusicController(), Add, true);
|
||||
|
||||
loadComponentSingleFile(notifications = new NotificationOverlay
|
||||
loadComponentSingleFile(notifications.With(d =>
|
||||
{
|
||||
GetToolbarHeight = () => ToolbarOffset,
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
}, rightFloatingOverlayContent.Add, true);
|
||||
d.GetToolbarHeight = () => ToolbarOffset;
|
||||
d.Anchor = Anchor.TopRight;
|
||||
d.Origin = Anchor.TopRight;
|
||||
}), rightFloatingOverlayContent.Add, true);
|
||||
|
||||
loadComponentSingleFile(screenshotManager, Add);
|
||||
|
||||
@ -761,7 +763,7 @@ namespace osu.Game
|
||||
Schedule(() => notifications.Post(new SimpleNotification
|
||||
{
|
||||
Icon = entry.Level == LogLevel.Important ? FontAwesome.Solid.ExclamationCircle : FontAwesome.Solid.Bomb,
|
||||
Text = entry.Message + (entry.Exception != null && IsDeployedBuild ? "\n\nThis error has been automatically reported to the devs." : string.Empty),
|
||||
Text = entry.Message.Truncate(256) + (entry.Exception != null && IsDeployedBuild ? "\n\nThis error has been automatically reported to the devs." : string.Empty),
|
||||
}));
|
||||
}
|
||||
else if (recentLogCount == short_term_display_limit)
|
||||
|
Reference in New Issue
Block a user