1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-17 06:32:36 +08:00

Rename new property to better explain visual-only usage

This commit is contained in:
Dean Herbert
2025-04-14 18:38:04 +09:00
Unverified
parent 85556e0c3e
commit f05a50f4e1
5 changed files with 13 additions and 16 deletions
@@ -26,21 +26,21 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
Name = @"Fruits",
Content = fruits.ToString(),
CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Circles),
Ratio = fruits / (float)sum,
BarDisplayLength = fruits / (float)sum,
},
new BeatmapStatistic
{
Name = @"Juice Streams",
Content = juiceStreams.ToString(),
CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Sliders),
Ratio = juiceStreams / (float)sum,
BarDisplayLength = juiceStreams / (float)sum,
},
new BeatmapStatistic
{
Name = @"Banana Showers",
Content = bananaShowers.ToString(),
CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Spinners),
Ratio = Math.Min(bananaShowers / 10f, 1),
BarDisplayLength = Math.Min(bananaShowers / 10f, 1),
}
};
}
@@ -45,14 +45,14 @@ namespace osu.Game.Rulesets.Mania.Beatmaps
Name = @"Notes",
CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Circles),
Content = notes.ToString(),
Ratio = notes / (float)sum,
BarDisplayLength = notes / (float)sum,
},
new BeatmapStatistic
{
Name = @"Hold Notes",
CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Sliders),
Content = holdNotes.ToString(),
Ratio = holdNotes / (float)sum,
BarDisplayLength = holdNotes / (float)sum,
},
};
}
+3 -3
View File
@@ -25,21 +25,21 @@ namespace osu.Game.Rulesets.Osu.Beatmaps
Name = "Circles",
Content = circles.ToString(),
CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Circles),
Ratio = circles / (float)sum,
BarDisplayLength = circles / (float)sum,
},
new BeatmapStatistic
{
Name = "Sliders",
Content = sliders.ToString(),
CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Sliders),
Ratio = sliders / (float)sum,
BarDisplayLength = sliders / (float)sum,
},
new BeatmapStatistic
{
Name = @"Spinners",
Content = spinners.ToString(),
CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Spinners),
Ratio = Math.Min(spinners / 10f, 1),
BarDisplayLength = Math.Min(spinners / 10f, 1),
}
};
}
@@ -25,21 +25,21 @@ namespace osu.Game.Rulesets.Taiko.Beatmaps
Name = @"Hits",
CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Circles),
Content = hits.ToString(),
Ratio = hits / (float)sum,
BarDisplayLength = hits / (float)sum,
},
new BeatmapStatistic
{
Name = @"Drumrolls",
CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Sliders),
Content = drumRolls.ToString(),
Ratio = drumRolls / (float)sum,
BarDisplayLength = drumRolls / (float)sum,
},
new BeatmapStatistic
{
Name = @"Swells",
CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Spinners),
Content = swells.ToString(),
Ratio = Math.Min(swells / 10f, 1),
BarDisplayLength = Math.Min(swells / 10f, 1),
}
};
}
+2 -5
View File
@@ -27,11 +27,8 @@ namespace osu.Game.Beatmaps
public string Content;
/// <summary>
/// The ratio of this statistic compared to other relevant statistics, or null if not applicable.
/// The length of a bar which visually represents this statistic's relevance in the beatmap.
/// </summary>
/// <remarks>
/// This is used to display a bar on top of the statistic with the given ratio.
/// </remarks>
public float? Ratio;
public float? BarDisplayLength;
}
}