1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-05 04:33:39 +08:00

Merge pull request #10483 from Joehuu/add-extended-stats-keyboard-shortcut

This commit is contained in:
Dean Herbert
2020-10-11 22:48:42 +09:00
committed by GitHub
Unverified
+19 -1
View File
@@ -10,9 +10,11 @@ using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Bindings;
using osu.Framework.Screens;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.UserInterface;
using osu.Game.Input.Bindings;
using osu.Game.Online.API;
using osu.Game.Scoring;
using osu.Game.Screens.Backgrounds;
@@ -22,7 +24,7 @@ using osuTK;
namespace osu.Game.Screens.Ranking
{
public abstract class ResultsScreen : OsuScreen
public abstract class ResultsScreen : OsuScreen, IKeyBindingHandler<GlobalAction>
{
protected const float BACKGROUND_BLUR = 20;
private static readonly float screen_height = 768 - TwoLayerButton.SIZE_EXTENDED.Y;
@@ -314,6 +316,22 @@ namespace osu.Game.Screens.Ranking
}
}
public bool OnPressed(GlobalAction action)
{
switch (action)
{
case GlobalAction.Select:
statisticsPanel.ToggleVisibility();
return true;
}
return false;
}
public void OnReleased(GlobalAction action)
{
}
private class VerticalScrollContainer : OsuScrollContainer
{
protected override Container<Drawable> Content => content;