mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 06:03:08 +08:00
Add protected method for customising statistics panel
This commit is contained in:
parent
cf0b3ec879
commit
600ada46be
@ -96,11 +96,11 @@ namespace osu.Game.Screens.Ranking
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
statisticsPanel = new StatisticsPanel
|
statisticsPanel = CreateStatisticsPanel().With(panel =>
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
panel.RelativeSizeAxes = Axes.Both;
|
||||||
Score = { BindTarget = SelectedScore }
|
panel.Score.BindTarget = SelectedScore;
|
||||||
},
|
}),
|
||||||
ScorePanelList = new ScorePanelList
|
ScorePanelList = new ScorePanelList
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
@ -231,6 +231,11 @@ namespace osu.Game.Screens.Ranking
|
|||||||
/// <returns>An <see cref="APIRequest"/> responsible for the fetch operation. This will be queued and performed automatically.</returns>
|
/// <returns>An <see cref="APIRequest"/> responsible for the fetch operation. This will be queued and performed automatically.</returns>
|
||||||
protected virtual APIRequest FetchNextPage(int direction, Action<IEnumerable<ScoreInfo>> scoresCallback) => null;
|
protected virtual APIRequest FetchNextPage(int direction, Action<IEnumerable<ScoreInfo>> scoresCallback) => null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates the <see cref="StatisticsPanel"/> to be used to display extended information about scores.
|
||||||
|
/// </summary>
|
||||||
|
protected virtual StatisticsPanel CreateStatisticsPanel() => new StatisticsPanel();
|
||||||
|
|
||||||
private void fetchScoresCallback(IEnumerable<ScoreInfo> scores) => Schedule(() =>
|
private void fetchScoresCallback(IEnumerable<ScoreInfo> scores) => Schedule(() =>
|
||||||
{
|
{
|
||||||
foreach (var s in scores)
|
foreach (var s in scores)
|
||||||
|
Loading…
Reference in New Issue
Block a user