mirror of https://github.com/ppy/osu
Make overlay shortcuts able to be toggled instead of repeatable
This commit is contained in:
parent
e2f1183e7d
commit
0f94616890
|
@ -95,6 +95,8 @@ public class OsuGame : OsuGameBase, IKeyBindingHandler<GlobalAction>, ILocalUser
|
|||
|
||||
private SkinEditorOverlay skinEditor;
|
||||
|
||||
private NowPlayingOverlay nowPlayingOverlay;
|
||||
|
||||
private Container overlayContent;
|
||||
|
||||
private Container rightFloatingOverlayContent;
|
||||
|
@ -818,7 +820,7 @@ protected override void LoadComplete()
|
|||
Origin = Anchor.TopRight,
|
||||
}, rightFloatingOverlayContent.Add, true);
|
||||
|
||||
loadComponentSingleFile(new NowPlayingOverlay
|
||||
loadComponentSingleFile(nowPlayingOverlay = new NowPlayingOverlay
|
||||
{
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
|
@ -1069,6 +1071,26 @@ public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
|||
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue