mirror of
https://github.com/osukey/osukey.git
synced 2025-05-21 05:27:17 +09:00
Convert bindable names to human readable sentences
This commit is contained in:
parent
a33ffd56b8
commit
4374e7da81
@ -5,6 +5,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using Humanizer;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Extensions.TypeExtensions;
|
using osu.Framework.Extensions.TypeExtensions;
|
||||||
@ -162,7 +163,7 @@ namespace osu.Game.Configuration
|
|||||||
{
|
{
|
||||||
var val = property.GetValue(obj);
|
var val = property.GetValue(obj);
|
||||||
string description = (val as IHasDescription)?.Description ?? string.Empty;
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user