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
commit 8431a5a23c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 1 deletions

View File

@ -10,9 +10,11 @@
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 @@
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 @@ private void onStatisticsStateChanged(ValueChangedEvent<Visibility> state)
}
}
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;