1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 13:22:55 +08:00

Make overlay shortcuts able to be toggled instead of repeatable

This commit is contained in:
Ame 2022-04-02 19:41:15 +02:00
parent e2f1183e7d
commit 0f94616890

View File

@ -95,6 +95,8 @@ namespace osu.Game
private SkinEditorOverlay skinEditor;
private NowPlayingOverlay nowPlayingOverlay;
private Container overlayContent;
private Container rightFloatingOverlayContent;
@ -818,7 +820,7 @@ namespace osu.Game
Origin = Anchor.TopRight,
}, rightFloatingOverlayContent.Add, true);
loadComponentSingleFile(new NowPlayingOverlay
loadComponentSingleFile(nowPlayingOverlay = new NowPlayingOverlay
{
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
@ -1069,6 +1071,26 @@ namespace osu.Game
SkinManager.SelectRandomSkin();
return true;
case GlobalAction.ToggleChat:
chatOverlay.ToggleVisibility();
return true;
case GlobalAction.ToggleSocial:
dashboard.ToggleVisibility();
return true;
case GlobalAction.ToggleNowPlaying:
nowPlayingOverlay.ToggleVisibility();
return true;
case GlobalAction.ToggleBeatmapListing:
beatmapListing.ToggleVisibility();
return true;
case GlobalAction.ToggleSettings:
Settings.ToggleVisibility();
return true;
}
return false;