1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 04:42:58 +08:00

General fix for ToolbarButton toggle repetition

This commit is contained in:
Ame 2022-04-02 20:45:00 +02:00
parent 0f94616890
commit 35629e9be8
2 changed files with 2 additions and 24 deletions

View File

@ -95,8 +95,6 @@ namespace osu.Game
private SkinEditorOverlay skinEditor;
private NowPlayingOverlay nowPlayingOverlay;
private Container overlayContent;
private Container rightFloatingOverlayContent;
@ -820,7 +818,7 @@ namespace osu.Game
Origin = Anchor.TopRight,
}, rightFloatingOverlayContent.Add, true);
loadComponentSingleFile(nowPlayingOverlay = new NowPlayingOverlay
loadComponentSingleFile(new NowPlayingOverlay
{
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
@ -1071,26 +1069,6 @@ 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;

View File

@ -190,7 +190,7 @@ namespace osu.Game.Overlays.Toolbar
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
{
if (e.Action == Hotkey)
if (!e.Repeat && e.Action == Hotkey)
{
TriggerClick();
return true;