mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 15:33:05 +08:00
Move Rankings property below ctor
This commit is contained in:
parent
bb3152ac8b
commit
14c471fe5d
@ -23,23 +23,6 @@ namespace osu.Game.Overlays.Rankings.Tables
|
||||
private readonly int page;
|
||||
private readonly FillFlowContainer backgroundFlow;
|
||||
|
||||
public IReadOnlyList<TModel> Rankings
|
||||
{
|
||||
set
|
||||
{
|
||||
Content = null;
|
||||
backgroundFlow.Clear();
|
||||
|
||||
if (value?.Any() != true)
|
||||
return;
|
||||
|
||||
value.ForEach(_ => backgroundFlow.Add(new TableRowBackground()));
|
||||
|
||||
Columns = CreateHeaders();
|
||||
Content = value.Select((s, i) => CreateContent(page * items_per_page - (items_per_page - i), s)).ToArray().ToRectangular();
|
||||
}
|
||||
}
|
||||
|
||||
protected RankingsTable(int page)
|
||||
{
|
||||
this.page = page;
|
||||
@ -58,6 +41,23 @@ namespace osu.Game.Overlays.Rankings.Tables
|
||||
});
|
||||
}
|
||||
|
||||
public IReadOnlyList<TModel> Rankings
|
||||
{
|
||||
set
|
||||
{
|
||||
Content = null;
|
||||
backgroundFlow.Clear();
|
||||
|
||||
if (value?.Any() != true)
|
||||
return;
|
||||
|
||||
value.ForEach(_ => backgroundFlow.Add(new TableRowBackground()));
|
||||
|
||||
Columns = CreateHeaders();
|
||||
Content = value.Select((s, i) => CreateContent(page * items_per_page - (items_per_page - i), s)).ToArray().ToRectangular();
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract TableColumn[] CreateHeaders();
|
||||
|
||||
protected abstract Drawable[] CreateContent(int index, TModel item);
|
||||
|
Loading…
Reference in New Issue
Block a user