2017-02-07 04:59:30 +00:00
|
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
2017-02-02 08:33:39 +00:00
|
|
|
|
using osu.Framework.Graphics.Containers;
|
2017-03-03 01:17:39 +00:00
|
|
|
|
using osu.Framework.Input;
|
|
|
|
|
using OpenTK.Input;
|
2017-04-01 18:29:17 +00:00
|
|
|
|
using osu.Game.Graphics;
|
|
|
|
|
using OpenTK.Graphics;
|
2017-01-27 09:24:49 +00:00
|
|
|
|
|
2017-03-03 01:17:39 +00:00
|
|
|
|
namespace osu.Game.Screens.Play
|
2017-02-02 08:33:39 +00:00
|
|
|
|
{
|
2017-03-28 09:09:26 +00:00
|
|
|
|
public class FailOverlay : InGameOverlay
|
2017-02-02 08:33:39 +00:00
|
|
|
|
{
|
|
|
|
|
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
|
|
|
|
{
|
|
|
|
|
if (args.Key == Key.Escape)
|
|
|
|
|
{
|
2017-01-31 13:17:47 +00:00
|
|
|
|
if (State == Visibility.Hidden) return false;
|
2017-03-28 07:49:58 +00:00
|
|
|
|
OnQuit();
|
2017-02-02 08:33:39 +00:00
|
|
|
|
return true;
|
|
|
|
|
}
|
2017-02-09 03:46:53 +00:00
|
|
|
|
|
2017-02-02 08:33:39 +00:00
|
|
|
|
return base.OnKeyDown(state, args);
|
|
|
|
|
}
|
2017-04-01 18:29:17 +00:00
|
|
|
|
|
|
|
|
|
protected override void AddButtons(OsuColour colours)
|
|
|
|
|
{
|
|
|
|
|
AddButton(@"Retry", colours.YellowDark, OnRetry);
|
|
|
|
|
AddButton(@"Quit to Main Menu", new Color4(170, 27, 39, 255), OnQuit);
|
|
|
|
|
}
|
2017-04-01 18:42:12 +00:00
|
|
|
|
|
|
|
|
|
public FailOverlay()
|
|
|
|
|
{
|
|
|
|
|
title = @"failed";
|
|
|
|
|
description = @"you're dead, try again?";
|
|
|
|
|
}
|
2017-02-02 08:33:39 +00:00
|
|
|
|
}
|
|
|
|
|
}
|