diff --git a/osu.Game/Configuration/DisplayNameAttribute.cs b/osu.Game/Configuration/DisplayNameAttribute.cs deleted file mode 100644 index 1665dec2dd..0000000000 --- a/osu.Game/Configuration/DisplayNameAttribute.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -namespace osu.Game.Configuration -{ - [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] - public class DisplayNameAttribute : Attribute - { - public string Name { get; set; } - - public DisplayNameAttribute(string name) - { - Name = name; - } - } -} - diff --git a/osu.Game/Configuration/HiddenAttribute.cs b/osu.Game/Configuration/HiddenAttribute.cs deleted file mode 100644 index b8763a3fdd..0000000000 --- a/osu.Game/Configuration/HiddenAttribute.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -namespace osu.Game.Configuration -{ - public class HiddenAttribute - { - public HiddenAttribute() - { - } - } -} \ No newline at end of file diff --git a/osu.Game/Configuration/ProgressBarType.cs b/osu.Game/Configuration/ProgressBarType.cs index 06db19d392..e252c84558 100644 --- a/osu.Game/Configuration/ProgressBarType.cs +++ b/osu.Game/Configuration/ProgressBarType.cs @@ -1,4 +1,5 @@ using System; +using System.ComponentModel; namespace osu.Game.Configuration { @@ -6,9 +7,9 @@ namespace osu.Game.Configuration { Off, Pie, - [DisplayName("Top Right")] + [Description("Top Right")] TopRight, - [DisplayName("Bottom Right")] + [Description("Bottom Right")] BottomRight, Bottom } diff --git a/osu.Game/Configuration/RankingType.cs b/osu.Game/Configuration/RankingType.cs index 5cfc7df549..e2f0b4cd00 100644 --- a/osu.Game/Configuration/RankingType.cs +++ b/osu.Game/Configuration/RankingType.cs @@ -1,12 +1,14 @@ using System; +using System.ComponentModel; + namespace osu.Game.Configuration { public enum RankingType { Local, - [DisplayName("Global")] + [Description("Global")] Top, - [DisplayName("Selected Mods")] + [Description("Selected Mods")] SelectedMod, Friends, Country diff --git a/osu.Game/Configuration/ScreenshotFormat.cs b/osu.Game/Configuration/ScreenshotFormat.cs index 81a734283c..993678f0b9 100644 --- a/osu.Game/Configuration/ScreenshotFormat.cs +++ b/osu.Game/Configuration/ScreenshotFormat.cs @@ -1,12 +1,14 @@ using System; +using System.ComponentModel; + namespace osu.Game.Configuration { public enum ScreenshotFormat { Bmp = 0, // TODO: Figure out the best way to hide this from the dropdown - [DisplayName("JPG (web-friendly)")] + [Description("JPG (web-friendly)")] Jpg = 1, - [DisplayName("PNG (lossless)")] + [Description("PNG (lossless)")] Png = 2 } } \ No newline at end of file diff --git a/osu.Game/Overlays/Options/DropdownOption.cs b/osu.Game/Overlays/Options/DropdownOption.cs index 71fb4720c3..a75824ddd5 100644 --- a/osu.Game/Overlays/Options/DropdownOption.cs +++ b/osu.Game/Overlays/Options/DropdownOption.cs @@ -1,4 +1,5 @@ using System; +using System.ComponentModel; using System.Linq; using System.Reflection; using OpenTK.Graphics; @@ -56,7 +57,7 @@ namespace osu.Game.Overlays.Options AutoSizeAxes = Axes.Y; var items = typeof(T).GetFields().Where(f => !f.IsSpecialName).Zip( (T[])Enum.GetValues(typeof(T)), (a, b) => new Tuple( - a.GetCustomAttribute()?.Name ?? a.Name, b)); + a.GetCustomAttribute()?.Description ?? a.Name, b)); Children = new Drawable[] { text = new SpriteText { Alpha = 0 }, diff --git a/osu.Game/Overlays/Options/General/UpdateOptions.cs b/osu.Game/Overlays/Options/General/UpdateOptions.cs index e00790765c..77cfd11273 100644 --- a/osu.Game/Overlays/Options/General/UpdateOptions.cs +++ b/osu.Game/Overlays/Options/General/UpdateOptions.cs @@ -22,7 +22,7 @@ namespace osu.Game.Overlays.Options.General { new DropdownOption { - Label = "Release stream", + LabelText = "Release stream", Bindable = config.GetBindable(OsuConfig.ReleaseStream), }, new SpriteText { Text = "Your osu! is up to date" }, // TODO: map this to reality diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index affbbad2fe..a15cd5db7d 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -225,7 +225,6 @@ -