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
1 changed files with 4 additions and 2 deletions

View File

@ -601,14 +601,14 @@ protected override void LoadComplete()
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 @@ protected override void LoadComplete()
};
}
overlays.AddRange(new OverlayContainer[] { login, nowPlaying });
OverlayActivationMode.ValueChanged += mode =>
{
if (mode.NewValue != OverlayActivation.All) CloseAllOverlays();