Skip to content

Commit

Permalink
Merge pull request #2024 from andy840119/update-package-to-the-latest
Browse files Browse the repository at this point in the history
Upgrade the package to the latest and fix the compile error.
  • Loading branch information
andy840119 authored Jun 5, 2023
2 parents dcbee3b + eee3fbb commit 2e165f3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 39 deletions.
57 changes: 19 additions & 38 deletions osu.Game.Rulesets.Karaoke/KaraokeRuleset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -237,65 +237,46 @@ public override LocalisableString GetDisplayNameForHitResult(HitResult result)
};
}

public override StatisticRow[] CreateStatisticsForScore(ScoreInfo score, IBeatmap playableBeatmap)
public override StatisticItem[] CreateStatisticsForScore(ScoreInfo score, IBeatmap playableBeatmap)
{
const int fix_height = 560;
const int text_size = 14;
const int spacing = 15;
const int info_height = 200;

// Always display song info
var statistic = new List<StatisticRow>
var statistic = new List<StatisticItem>
{
new()
new("Info", () => new BeatmapInfoGraph(playableBeatmap)
{
Columns = new[]
{
new StatisticItem("Info", () => new BeatmapInfoGraph(playableBeatmap)
{
RelativeSizeAxes = Axes.X,
Height = info_height
}, dimension: new Dimension(GridSizeMode.Relative, 0.6f)),
new StatisticItem(string.Empty, Drawable.Empty, dimension: new Dimension(GridSizeMode.Absolute, 10)),
new StatisticItem("Metadata", () => new BeatmapMetadataGraph(playableBeatmap)
{
RelativeSizeAxes = Axes.X,
Height = info_height
}, dimension: new Dimension())
}
},
RelativeSizeAxes = Axes.X,
Height = info_height
}),
new("Metadata", () => new BeatmapMetadataGraph(playableBeatmap)
{
RelativeSizeAxes = Axes.X,
Height = info_height
})
};

// Set component to remain height
const int remain_height = fix_height - text_size - spacing - info_height;

if (playableBeatmap.IsScorable())
{
statistic.Add(new StatisticRow
statistic.Add(new StatisticItem("Scoring Result", () => new ScoringResultGraph(score, playableBeatmap)
{
Columns = new[]
{
new StatisticItem("Scoring Result", () => new ScoringResultGraph(score, playableBeatmap)
{
RelativeSizeAxes = Axes.X,
Height = remain_height - text_size - spacing
}),
}
});
RelativeSizeAxes = Axes.X,
Height = remain_height - text_size - spacing
}));
}
else
{
statistic.Add(new StatisticRow
statistic.Add(new StatisticItem("Result", () => new NotScorableGraph
{
Columns = new[]
{
new StatisticItem("Result", () => new NotScorableGraph
{
RelativeSizeAxes = Axes.X,
Height = remain_height - text_size - spacing
})
}
});
RelativeSizeAxes = Axes.X,
Height = remain_height - text_size - spacing
}));
}

return statistic.ToArray();
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="ppy.osu.Game" Version="2023.510.0" />
<PackageReference Include="ppy.osu.Game" Version="2023.605.0" />
<PackageReference Include="Lucene.Net" Version="4.8.0-beta00016" />
<PackageReference Include="Lucene.Net.Analysis.Kuromoji" Version="4.8.0-beta00016" />
<PackageReference Include="SixLabors.Fonts" Version="1.0.0-beta18" />
Expand Down

0 comments on commit 2e165f3

Please sign in to comment.