From cdd2b54dc7543d85a413f8db8c43b7f1398cc7c0 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Fri, 19 May 2017 20:25:08 -0300 Subject: [PATCH] Move SlimEnumDropdown into it's own file --- osu.Game/Overlays/Direct/FilterControl.cs | 33 --------------- osu.Game/Overlays/Direct/SlimEnumDropdown.cs | 43 ++++++++++++++++++++ osu.Game/osu.Game.csproj | 1 + 3 files changed, 44 insertions(+), 33 deletions(-) create mode 100644 osu.Game/Overlays/Direct/SlimEnumDropdown.cs diff --git a/osu.Game/Overlays/Direct/FilterControl.cs b/osu.Game/Overlays/Direct/FilterControl.cs index 28450718b2..4c082d4d76 100644 --- a/osu.Game/Overlays/Direct/FilterControl.cs +++ b/osu.Game/Overlays/Direct/FilterControl.cs @@ -10,7 +10,6 @@ using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; -using osu.Framework.Graphics.UserInterface; using osu.Game.Database; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; @@ -285,38 +284,6 @@ namespace osu.Game.Overlays.Direct bindable.ValueChanged -= Bindable_ValueChanged; } } - - private class SlimEnumDropdown : OsuEnumDropdown - { - public const float HEIGHT = 25; - - protected override DropdownHeader CreateHeader() => new SlimDropdownHeader { AccentColour = AccentColour }; - protected override Menu CreateMenu() => new SlimMenu(); - - private class SlimDropdownHeader : OsuDropdownHeader - { - public SlimDropdownHeader() - { - Height = HEIGHT; - Icon.TextSize = 16; - Foreground.Padding = new MarginPadding { Top = 4, Bottom = 4, Left = 8, Right = 4 }; - } - - protected override void LoadComplete() - { - base.LoadComplete(); - BackgroundColour = Color4.Black.Opacity(0.25f); - } - } - - private class SlimMenu : OsuMenu - { - public SlimMenu() - { - Background.Colour = Color4.Black.Opacity(0.25f); - } - } - } } public class ResultCounts diff --git a/osu.Game/Overlays/Direct/SlimEnumDropdown.cs b/osu.Game/Overlays/Direct/SlimEnumDropdown.cs new file mode 100644 index 0000000000..f77a60887a --- /dev/null +++ b/osu.Game/Overlays/Direct/SlimEnumDropdown.cs @@ -0,0 +1,43 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using OpenTK.Graphics; +using osu.Framework.Extensions.Color4Extensions; +using osu.Framework.Graphics; +using osu.Framework.Graphics.UserInterface; +using osu.Game.Graphics.UserInterface; + +namespace osu.Game.Overlays.Direct +{ + public class SlimEnumDropdown : OsuEnumDropdown + { + public const float HEIGHT = 25; + + protected override DropdownHeader CreateHeader() => new SlimDropdownHeader { AccentColour = AccentColour }; + protected override Menu CreateMenu() => new SlimMenu(); + + private class SlimDropdownHeader : OsuDropdownHeader + { + public SlimDropdownHeader() + { + Height = HEIGHT; + Icon.TextSize = 16; + Foreground.Padding = new MarginPadding { Top = 4, Bottom = 4, Left = 8, Right = 4 }; + } + + protected override void LoadComplete() + { + base.LoadComplete(); + BackgroundColour = Color4.Black.Opacity(0.25f); + } + } + + private class SlimMenu : OsuMenu + { + public SlimMenu() + { + Background.Colour = Color4.Black.Opacity(0.25f); + } + } + } +} diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index c7b3290a08..a362306938 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -438,6 +438,7 @@ +