mirror of
https://github.com/osukey/osukey.git
synced 2025-06-24 20:57:56 +09:00
Merge pull request #2279 from peppy/fix-settings-notification-verlay
Only allow settings or notifications to be visible at once
This commit is contained in:
commit
a6bcb0bbd1
@ -302,6 +302,21 @@ namespace osu.Game
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var singleDisplaySideOverlays = new OverlayContainer[] { settings, notifications };
|
||||||
|
foreach (var overlay in singleDisplaySideOverlays)
|
||||||
|
{
|
||||||
|
overlay.StateChanged += state =>
|
||||||
|
{
|
||||||
|
if (state == Visibility.Hidden) return;
|
||||||
|
|
||||||
|
foreach (var c in singleDisplaySideOverlays)
|
||||||
|
{
|
||||||
|
if (c == overlay) continue;
|
||||||
|
c.State = Visibility.Hidden;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// eventually informational overlays should be displayed in a stack, but for now let's only allow one to stay open at a time.
|
// eventually informational overlays should be displayed in a stack, but for now let's only allow one to stay open at a time.
|
||||||
var informationalOverlays = new OverlayContainer[] { beatmapSetOverlay, userProfile };
|
var informationalOverlays = new OverlayContainer[] { beatmapSetOverlay, userProfile };
|
||||||
foreach (var overlay in informationalOverlays)
|
foreach (var overlay in informationalOverlays)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user