1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-12 04:12:56 +08:00

Fix home button not closing login and now playing overlays

This commit is contained in:
Joehu 2019-11-07 14:38:06 -08:00
parent 6805c029e7
commit 5235d2b319

View File

@ -601,14 +601,14 @@ namespace osu.Game
loadComponentSingleFile(userProfile = new UserProfileOverlay(), overlayContent.Add, true);
loadComponentSingleFile(beatmapSetOverlay = new BeatmapSetOverlay(), overlayContent.Add, true);
loadComponentSingleFile(new LoginOverlay
var login = loadComponentSingleFile(new LoginOverlay
{
GetToolbarHeight = () => ToolbarOffset,
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
}, rightFloatingOverlayContent.Add, true);
loadComponentSingleFile(new NowPlayingOverlay
var nowPlaying = loadComponentSingleFile(new NowPlayingOverlay
{
GetToolbarHeight = () => ToolbarOffset,
Anchor = Anchor.TopRight,
@ -671,6 +671,8 @@ namespace osu.Game
};
}
overlays.AddRange(new OverlayContainer[] { login, nowPlaying });
OverlayActivationMode.ValueChanged += mode =>
{
if (mode.NewValue != OverlayActivation.All) CloseAllOverlays();