diff --git a/osu.Game/Graphics/UserInterface/OsuDropDown.cs b/osu.Game/Graphics/UserInterface/OsuDropdown.cs similarity index 67% rename from osu.Game/Graphics/UserInterface/OsuDropDown.cs rename to osu.Game/Graphics/UserInterface/OsuDropdown.cs index a921be1a1d..d8d4a93091 100644 --- a/osu.Game/Graphics/UserInterface/OsuDropDown.cs +++ b/osu.Game/Graphics/UserInterface/OsuDropdown.cs @@ -8,9 +8,9 @@ using osu.Framework.Graphics.UserInterface; namespace osu.Game.Graphics.UserInterface { - public class OsuDropDown : DropDown + public class OsuDropdown : Dropdown { - protected override DropDownHeader CreateHeader() => new OsuDropDownHeader { AccentColour = AccentColour }; + protected override DropdownHeader CreateHeader() => new OsuDropdownHeader { AccentColour = AccentColour }; protected override Menu CreateMenu() => new OsuMenu(); @@ -22,8 +22,8 @@ namespace osu.Game.Graphics.UserInterface { accentColour = value; if (Header != null) - ((OsuDropDownHeader)Header).AccentColour = value; - foreach (var item in MenuItems.OfType>()) + ((OsuDropdownHeader)Header).AccentColour = value; + foreach (var item in MenuItems.OfType>()) item.AccentColour = value; } } @@ -35,6 +35,6 @@ namespace osu.Game.Graphics.UserInterface AccentColour = colours.PinkDarker; } - protected override DropDownMenuItem CreateMenuItem(string text, T value) => new OsuDropDownMenuItem(text, value) { AccentColour = AccentColour }; + protected override DropdownMenuItem CreateMenuItem(string text, T value) => new OsuDropdownMenuItem(text, value) { AccentColour = AccentColour }; } } \ No newline at end of file diff --git a/osu.Game/Graphics/UserInterface/OsuDropDownHeader.cs b/osu.Game/Graphics/UserInterface/OsuDropdownHeader.cs similarity index 92% rename from osu.Game/Graphics/UserInterface/OsuDropDownHeader.cs rename to osu.Game/Graphics/UserInterface/OsuDropdownHeader.cs index 559ffca283..8bef24a6f8 100644 --- a/osu.Game/Graphics/UserInterface/OsuDropDownHeader.cs +++ b/osu.Game/Graphics/UserInterface/OsuDropdownHeader.cs @@ -12,7 +12,7 @@ using osu.Framework.Extensions.Color4Extensions; namespace osu.Game.Graphics.UserInterface { - public class OsuDropDownHeader : DropDownHeader + public class OsuDropdownHeader : DropdownHeader { private SpriteText label; protected override string Label @@ -32,7 +32,7 @@ namespace osu.Game.Graphics.UserInterface } } - public OsuDropDownHeader() + public OsuDropdownHeader() { Foreground.Padding = new MarginPadding(4); diff --git a/osu.Game/Graphics/UserInterface/OsuDropDownMenuItem.cs b/osu.Game/Graphics/UserInterface/OsuDropdownMenuItem.cs similarity index 92% rename from osu.Game/Graphics/UserInterface/OsuDropDownMenuItem.cs rename to osu.Game/Graphics/UserInterface/OsuDropdownMenuItem.cs index 71650dee52..bcd53a8dbd 100644 --- a/osu.Game/Graphics/UserInterface/OsuDropDownMenuItem.cs +++ b/osu.Game/Graphics/UserInterface/OsuDropdownMenuItem.cs @@ -12,9 +12,9 @@ using OpenTK.Graphics; namespace osu.Game.Graphics.UserInterface { - public class OsuDropDownMenuItem : DropDownMenuItem + public class OsuDropdownMenuItem : DropdownMenuItem { - public OsuDropDownMenuItem(string text, U value) : base(text, value) + public OsuDropdownMenuItem(string text, T value) : base(text, value) { Foreground.Padding = new MarginPadding(2); diff --git a/osu.Game/Graphics/UserInterface/OsuTabControl.cs b/osu.Game/Graphics/UserInterface/OsuTabControl.cs index 84f3125ca4..8a22347c76 100644 --- a/osu.Game/Graphics/UserInterface/OsuTabControl.cs +++ b/osu.Game/Graphics/UserInterface/OsuTabControl.cs @@ -16,11 +16,11 @@ namespace osu.Game.Graphics.UserInterface { public class OsuTabControl : TabControl { - protected override DropDown CreateDropDown() => new OsuTabDropDown(); + protected override Dropdown CreateDropdown() => new OsuTabDropdown(); protected override TabItem CreateTabItem(T value) => new OsuTabItem { Value = value }; - protected override bool InternalContains(Vector2 screenSpacePos) => base.InternalContains(screenSpacePos) || DropDown.Contains(screenSpacePos); + protected override bool InternalContains(Vector2 screenSpacePos) => base.InternalContains(screenSpacePos) || Dropdown.Contains(screenSpacePos); public OsuTabControl() { @@ -45,7 +45,7 @@ namespace osu.Game.Graphics.UserInterface set { accentColour = value; - var dropDown = DropDown as OsuTabDropDown; + var dropDown = Dropdown as OsuTabDropdown; if (dropDown != null) dropDown.AccentColour = value; foreach (var item in TabContainer.Children.OfType>()) @@ -53,34 +53,34 @@ namespace osu.Game.Graphics.UserInterface } } - public class OsuTabDropDown : OsuDropDown + public class OsuTabDropdown : OsuDropdown { - protected override DropDownHeader CreateHeader() => new OsuTabDropDownHeader + protected override DropdownHeader CreateHeader() => new OsuTabDropdownHeader { AccentColour = AccentColour, Anchor = Anchor.TopRight, Origin = Anchor.TopRight, }; - protected override DropDownMenuItem CreateMenuItem(string text, T value) + protected override DropdownMenuItem CreateMenuItem(string text, T value) { var item = base.CreateMenuItem(text, value); item.ForegroundColourHover = Color4.Black; return item; } - public OsuTabDropDown() + public OsuTabDropdown() { - DropDownMenu.Anchor = Anchor.TopRight; - DropDownMenu.Origin = Anchor.TopRight; + DropdownMenu.Anchor = Anchor.TopRight; + DropdownMenu.Origin = Anchor.TopRight; RelativeSizeAxes = Axes.X; - DropDownMenu.Background.Colour = Color4.Black.Opacity(0.7f); - DropDownMenu.MaxHeight = 400; + DropdownMenu.Background.Colour = Color4.Black.Opacity(0.7f); + DropdownMenu.MaxHeight = 400; } - public class OsuTabDropDownHeader : OsuDropDownHeader + public class OsuTabDropdownHeader : OsuDropdownHeader { public override Color4 AccentColour { @@ -104,7 +104,7 @@ namespace osu.Game.Graphics.UserInterface base.OnHoverLost(state); } - public OsuTabDropDownHeader() + public OsuTabDropdownHeader() { RelativeSizeAxes = Axes.None; AutoSizeAxes = Axes.X; diff --git a/osu.Game/Overlays/Options/OptionDropDown.cs b/osu.Game/Overlays/Options/OptionDropdown.cs similarity index 88% rename from osu.Game/Overlays/Options/OptionDropDown.cs rename to osu.Game/Overlays/Options/OptionDropdown.cs index 9c9cd17b12..d46e786bca 100644 --- a/osu.Game/Overlays/Options/OptionDropDown.cs +++ b/osu.Game/Overlays/Options/OptionDropdown.cs @@ -13,9 +13,9 @@ using osu.Game.Graphics.UserInterface; namespace osu.Game.Overlays.Options { - public class OptionDropDown : FillFlowContainer + public class OptionDropdown : FillFlowContainer { - private DropDown dropdown; + private Dropdown dropdown; private SpriteText text; public string LabelText @@ -56,7 +56,7 @@ namespace osu.Game.Overlays.Options } } - public OptionDropDown() + public OptionDropdown() { Items = new KeyValuePair[0]; @@ -68,7 +68,7 @@ namespace osu.Game.Overlays.Options text = new OsuSpriteText { Alpha = 0, }, - dropdown = new OsuDropDown + dropdown = new OsuDropdown { Margin = new MarginPadding { Top = 5 }, RelativeSizeAxes = Axes.X, diff --git a/osu.Game/Overlays/Options/OptionEnumDropDown.cs b/osu.Game/Overlays/Options/OptionEnumDropdown.cs similarity index 89% rename from osu.Game/Overlays/Options/OptionEnumDropDown.cs rename to osu.Game/Overlays/Options/OptionEnumDropdown.cs index 50d1d36b4c..1a4f4635e2 100644 --- a/osu.Game/Overlays/Options/OptionEnumDropDown.cs +++ b/osu.Game/Overlays/Options/OptionEnumDropdown.cs @@ -8,9 +8,9 @@ using System.Collections.Generic; namespace osu.Game.Overlays.Options { - public class OptionEnumDropDown : OptionDropDown + public class OptionEnumDropdown : OptionDropdown { - public OptionEnumDropDown() + public OptionEnumDropdown() { if (!typeof(T).IsEnum) throw new InvalidOperationException("OptionsDropdown only supports enums as the generic type argument"); diff --git a/osu.Game/Overlays/Options/Sections/Audio/AudioDevicesOptions.cs b/osu.Game/Overlays/Options/Sections/Audio/AudioDevicesOptions.cs index 25585845b0..2818f5fbd7 100644 --- a/osu.Game/Overlays/Options/Sections/Audio/AudioDevicesOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Audio/AudioDevicesOptions.cs @@ -14,7 +14,7 @@ namespace osu.Game.Overlays.Options.Sections.Audio protected override string Header => "Devices"; private AudioManager audio; - private OptionDropDown dropdown; + private OptionDropdown dropdown; [BackgroundDependencyLoader] private void load(AudioManager audio) @@ -50,7 +50,7 @@ namespace osu.Game.Overlays.Options.Sections.Audio Children = new Drawable[] { - dropdown = new OptionDropDown + dropdown = new OptionDropdown { Bindable = audio.AudioDevice }, diff --git a/osu.Game/Overlays/Options/Sections/Debug/GCOptions.cs b/osu.Game/Overlays/Options/Sections/Debug/GCOptions.cs index ada57e8dd0..4350625d51 100644 --- a/osu.Game/Overlays/Options/Sections/Debug/GCOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Debug/GCOptions.cs @@ -19,7 +19,7 @@ namespace osu.Game.Overlays.Options.Sections.Debug { Children = new Drawable[] { - new OptionEnumDropDown + new OptionEnumDropdown { LabelText = "Active mode", Bindable = config.GetBindable(FrameworkDebugConfig.ActiveGCMode) diff --git a/osu.Game/Overlays/Options/Sections/Gameplay/GeneralOptions.cs b/osu.Game/Overlays/Options/Sections/Gameplay/GeneralOptions.cs index 1c28f6247d..70a2c52322 100644 --- a/osu.Game/Overlays/Options/Sections/Gameplay/GeneralOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Gameplay/GeneralOptions.cs @@ -23,12 +23,12 @@ namespace osu.Game.Overlays.Options.Sections.Gameplay LabelText = "Background dim", Bindable = (BindableInt)config.GetBindable(OsuConfig.DimLevel) }, - new OptionEnumDropDown + new OptionEnumDropdown { LabelText = "Progress display", Bindable = config.GetBindable(OsuConfig.ProgressBarType) }, - new OptionEnumDropDown + new OptionEnumDropdown { LabelText = "Score meter type", Bindable = config.GetBindable(OsuConfig.ScoreMeter) diff --git a/osu.Game/Overlays/Options/Sections/General/UpdateOptions.cs b/osu.Game/Overlays/Options/Sections/General/UpdateOptions.cs index c45dc9cbd4..2b2939e432 100644 --- a/osu.Game/Overlays/Options/Sections/General/UpdateOptions.cs +++ b/osu.Game/Overlays/Options/Sections/General/UpdateOptions.cs @@ -18,7 +18,7 @@ namespace osu.Game.Overlays.Options.Sections.General { Children = new Drawable[] { - new OptionEnumDropDown + new OptionEnumDropdown { LabelText = "Release stream", Bindable = config.GetBindable(OsuConfig.ReleaseStream), diff --git a/osu.Game/Overlays/Options/Sections/Graphics/DetailOptions.cs b/osu.Game/Overlays/Options/Sections/Graphics/DetailOptions.cs index e66d097094..0af8a4c580 100644 --- a/osu.Game/Overlays/Options/Sections/Graphics/DetailOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Graphics/DetailOptions.cs @@ -57,7 +57,7 @@ namespace osu.Game.Overlays.Options.Sections.Graphics LabelText = "Softening filter", Bindable = config.GetBindable(OsuConfig.BloomSoftening) }, - new OptionEnumDropDown + new OptionEnumDropdown { LabelText = "Screenshot", Bindable = config.GetBindable(OsuConfig.ScreenshotFormat) diff --git a/osu.Game/Overlays/Options/Sections/Graphics/LayoutOptions.cs b/osu.Game/Overlays/Options/Sections/Graphics/LayoutOptions.cs index 0a2e8f91a4..8c4930d99d 100644 --- a/osu.Game/Overlays/Options/Sections/Graphics/LayoutOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Graphics/LayoutOptions.cs @@ -26,7 +26,7 @@ namespace osu.Game.Overlays.Options.Sections.Graphics Children = new Drawable[] { new OptionLabel { Text = "Resolution: TODO dropdown" }, - new OptionEnumDropDown + new OptionEnumDropdown { LabelText = "Screen mode", Bindable = config.GetBindable(FrameworkConfig.WindowMode), diff --git a/osu.Game/Overlays/Options/Sections/Graphics/RendererOptions.cs b/osu.Game/Overlays/Options/Sections/Graphics/RendererOptions.cs index b98337f1e6..c898879167 100644 --- a/osu.Game/Overlays/Options/Sections/Graphics/RendererOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Graphics/RendererOptions.cs @@ -20,7 +20,7 @@ namespace osu.Game.Overlays.Options.Sections.Graphics Children = new Drawable[] { // TODO: this needs to be a custom dropdown at some point - new OptionEnumDropDown + new OptionEnumDropdown { LabelText = "Frame limiter", Bindable = config.GetBindable(FrameworkConfig.FrameSync) diff --git a/osu.Game/Overlays/Options/Sections/Input/MouseOptions.cs b/osu.Game/Overlays/Options/Sections/Input/MouseOptions.cs index ef1dd755b7..92be00bdb0 100644 --- a/osu.Game/Overlays/Options/Sections/Input/MouseOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Input/MouseOptions.cs @@ -33,7 +33,7 @@ namespace osu.Game.Overlays.Options.Sections.Input LabelText = "Map absolute raw input to the osu! window", Bindable = config.GetBindable(OsuConfig.AbsoluteToOsuWindow) }, - new OptionEnumDropDown + new OptionEnumDropdown { LabelText = "Confine mouse cursor", Bindable = config.GetBindable(OsuConfig.ConfineMouse), diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 39b9d8d9e5..879ca9ddbe 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -161,9 +161,9 @@ - - - + + +