From 6ac33e3c007b91e89dfd1f4b5cadb9273a156168 Mon Sep 17 00:00:00 2001 From: Aergwyn Date: Mon, 18 Dec 2017 17:04:35 +0100 Subject: [PATCH] made DeleteAll-button pink --- .../Settings/DangerousSettingsButton.cs | 23 +++++++++++++++++++ .../Sections/Maintenance/GeneralSettings.cs | 2 +- osu.Game/osu.Game.csproj | 3 ++- 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 osu.Game/Overlays/Settings/DangerousSettingsButton.cs diff --git a/osu.Game/Overlays/Settings/DangerousSettingsButton.cs b/osu.Game/Overlays/Settings/DangerousSettingsButton.cs new file mode 100644 index 0000000000..7c324658a3 --- /dev/null +++ b/osu.Game/Overlays/Settings/DangerousSettingsButton.cs @@ -0,0 +1,23 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Framework.Allocation; +using osu.Game.Graphics; + +namespace osu.Game.Overlays.Settings +{ + /// + /// A with pink colours to mark dangerous/destructive actions. + /// + public class DangerousSettingsButton : SettingsButton + { + [BackgroundDependencyLoader] + private void load(OsuColour colours) + { + BackgroundColour = colours.Pink; + + Triangles.ColourDark = colours.PinkDark; + Triangles.ColourLight = colours.PinkLight; + } + } +} diff --git a/osu.Game/Overlays/Settings/Sections/Maintenance/GeneralSettings.cs b/osu.Game/Overlays/Settings/Sections/Maintenance/GeneralSettings.cs index 2c554a7e6b..1f389a22a1 100644 --- a/osu.Game/Overlays/Settings/Sections/Maintenance/GeneralSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Maintenance/GeneralSettings.cs @@ -33,7 +33,7 @@ private void load(BeatmapManager beatmaps, DialogOverlay dialogOverlay) .ContinueWith(t => Schedule(() => importButton.Enabled.Value = true), TaskContinuationOptions.LongRunning); } }, - deleteButton = new SettingsButton + deleteButton = new DangerousSettingsButton { Text = "Delete ALL beatmaps", Action = () => diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index adc422857b..1174a1c76d 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -270,6 +270,7 @@ + @@ -856,4 +857,4 @@ - + \ No newline at end of file