1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 14:07:25 +08:00
osu-lazer/osu.Game/Screens/Play/FailOverlay.cs
2017-04-01 21:29:17 +03:00

33 lines
981 B
C#

// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics.Containers;
using osu.Framework.Input;
using OpenTK.Input;
using osu.Game.Graphics;
using OpenTK.Graphics;
namespace osu.Game.Screens.Play
{
public class FailOverlay : InGameOverlay
{
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
{
if (args.Key == Key.Escape)
{
if (State == Visibility.Hidden) return false;
OnQuit();
return true;
}
return base.OnKeyDown(state, args);
}
protected override void AddButtons(OsuColour colours)
{
AddButton(@"Retry", colours.YellowDark, OnRetry);
AddButton(@"Quit to Main Menu", new Color4(170, 27, 39, 255), OnQuit);
}
}
}