mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 12:22:57 +08:00
Show mod settings as "on" or "off" rather than "True" or "False"
This commit is contained in:
parent
d6aded3ac3
commit
72d2715222
@ -71,8 +71,21 @@ namespace osu.Game.Rulesets.Mods
|
||||
{
|
||||
var bindable = (IBindable)property.GetValue(this)!;
|
||||
|
||||
string valueText;
|
||||
|
||||
switch (bindable)
|
||||
{
|
||||
case Bindable<bool> b:
|
||||
valueText = b.Value ? "on" : "off";
|
||||
break;
|
||||
|
||||
default:
|
||||
valueText = bindable.ToString() ?? string.Empty;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!bindable.IsDefault)
|
||||
tooltipTexts.Add($"{attr.Label}: {bindable}");
|
||||
tooltipTexts.Add($"{attr.Label}: {valueText}");
|
||||
}
|
||||
|
||||
return string.Join(", ", tooltipTexts.Where(s => !string.IsNullOrEmpty(s)));
|
||||
|
Loading…
Reference in New Issue
Block a user