Convert bindable names to human readable sentences

This commit is contained in:
Dean Herbert 2021-03-11 15:26:18 +09:00
parent a33ffd56b8
commit 4374e7da81

View File

@ -5,6 +5,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Humanizer;
using JetBrains.Annotations;
using osu.Framework.Bindables;
using osu.Framework.Extensions.TypeExtensions;
@ -162,7 +163,7 @@ namespace osu.Game.Configuration
{
var val = property.GetValue(obj);
string description = (val as IHasDescription)?.Description ?? string.Empty;
yield return (new SettingSourceAttribute(property.Name, description), property);
yield return (new SettingSourceAttribute(property.Name.Humanize(), description), property);
}
}
}