use SettingSource to define IconTooltip format

This commit is contained in:
Liam DeVoe
2020-03-20 12:47:17 -04:00
parent 7a0a633ef9
commit 5a6d8f1932
8 changed files with 52 additions and 30 deletions

View File

@ -21,15 +21,13 @@ namespace osu.Game.Rulesets.Mods
public override bool Ranked => true;
public override Type[] IncompatibleMods => new[] { typeof(ModHardRock), typeof(ModDifficultyAdjust) };
[SettingSource("Extra Lives", "Number of extra lives")]
[SettingSource("Extra Lives", "Number of extra lives", "{0} lives")]
public Bindable<int> Retries { get; } = new BindableInt(2)
{
MinValue = 0,
MaxValue = 10
};
public override string IconTooltip => $"{Name}{(Retries.IsDefault ? "" : $" ({Retries.Value} lives)")}";
private int retries;
private BindableNumber<double> health;