From bd123fa906b2a1e11c7723ee0fc9d8b4e4c38950 Mon Sep 17 00:00:00 2001 From: Andrey Zavadskiy Date: Sat, 1 Apr 2017 21:29:17 +0300 Subject: [PATCH] Better inheritance --- osu.Game/Screens/Play/FailOverlay.cs | 8 ++++++++ osu.Game/Screens/Play/InGameOverlay.cs | 3 +-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Play/FailOverlay.cs b/osu.Game/Screens/Play/FailOverlay.cs index 906e25d14f..8636537416 100644 --- a/osu.Game/Screens/Play/FailOverlay.cs +++ b/osu.Game/Screens/Play/FailOverlay.cs @@ -4,6 +4,8 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Input; using OpenTK.Input; +using osu.Game.Graphics; +using OpenTK.Graphics; namespace osu.Game.Screens.Play { @@ -20,5 +22,11 @@ namespace osu.Game.Screens.Play 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); + } } } diff --git a/osu.Game/Screens/Play/InGameOverlay.cs b/osu.Game/Screens/Play/InGameOverlay.cs index 91c2ac22c1..6081044467 100644 --- a/osu.Game/Screens/Play/InGameOverlay.cs +++ b/osu.Game/Screens/Play/InGameOverlay.cs @@ -201,8 +201,7 @@ namespace osu.Game.Screens.Play protected virtual void AddButtons(OsuColour colours) { - AddButton(@"Retry", colours.YellowDark, OnRetry); - AddButton(@"Quit to Main Menu", new Color4(170, 27, 39, 255), OnQuit); + } public InGameOverlay()