Add details test scene + fix metrics not getting updated correctly

This commit is contained in:
smoogipoo
2019-06-13 18:31:39 +09:00
parent 7af2d650cd
commit f2b5f274cf
2 changed files with 73 additions and 4 deletions

View File

@ -16,10 +16,11 @@ namespace osu.Game.Overlays.BeatmapSet
{
public class Details : FillFlowContainer
{
protected readonly UserRatings Ratings;
private readonly PreviewButton preview;
private readonly BasicStats basic;
private readonly AdvancedStats advanced;
private readonly UserRatings ratings;
private BeatmapSetInfo beatmapSet;
@ -33,6 +34,7 @@ namespace osu.Game.Overlays.BeatmapSet
beatmapSet = value;
basic.BeatmapSet = preview.BeatmapSet = BeatmapSet;
updateDisplay();
}
}
@ -46,13 +48,12 @@ namespace osu.Game.Overlays.BeatmapSet
if (value == beatmap) return;
basic.Beatmap = advanced.Beatmap = beatmap = value;
updateDisplay();
}
}
private void updateDisplay()
{
ratings.Metrics = BeatmapSet?.Metrics;
Ratings.Metrics = BeatmapSet?.Metrics;
}
public Details()
@ -87,7 +88,7 @@ namespace osu.Game.Overlays.BeatmapSet
},
new DetailBox
{
Child = ratings = new UserRatings
Child = Ratings = new UserRatings
{
RelativeSizeAxes = Axes.X,
Height = 95,