mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 15:44:04 +09:00
Naming adjustments
This commit is contained in:
@ -27,7 +27,7 @@ namespace osu.Game.Overlays
|
|||||||
private readonly Bindable<APISpotlight> spotlight = new Bindable<APISpotlight>();
|
private readonly Bindable<APISpotlight> spotlight = new Bindable<APISpotlight>();
|
||||||
|
|
||||||
private readonly BasicScrollContainer scrollFlow;
|
private readonly BasicScrollContainer scrollFlow;
|
||||||
private readonly Container tableContainer;
|
private readonly Container contentContainer;
|
||||||
private readonly DimmedLoadingLayer loading;
|
private readonly DimmedLoadingLayer loading;
|
||||||
private readonly Box background;
|
private readonly Box background;
|
||||||
private readonly RankingsOverlayHeader header;
|
private readonly RankingsOverlayHeader header;
|
||||||
@ -74,7 +74,7 @@ namespace osu.Game.Overlays
|
|||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
tableContainer = new Container
|
contentContainer = new Container
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
@ -160,12 +160,12 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
if (request == null)
|
if (request == null)
|
||||||
{
|
{
|
||||||
loadTable(null);
|
loadContent(null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
request.Success += () => loadTable(createTableFromResponse(request));
|
request.Success += () => loadContent(createContentFromResponse(request));
|
||||||
request.Failure += _ => loadTable(null);
|
request.Failure += _ => loadContent(null);
|
||||||
api.Queue(request);
|
api.Queue(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -189,7 +189,7 @@ namespace osu.Game.Overlays
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Drawable createTableFromResponse(APIRequest request)
|
private Drawable createContentFromResponse(APIRequest request)
|
||||||
{
|
{
|
||||||
switch (request)
|
switch (request)
|
||||||
{
|
{
|
||||||
@ -215,21 +215,21 @@ namespace osu.Game.Overlays
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadTable(Drawable table)
|
private void loadContent(Drawable content)
|
||||||
{
|
{
|
||||||
scrollFlow.ScrollToStart();
|
scrollFlow.ScrollToStart();
|
||||||
|
|
||||||
if (table == null)
|
if (content == null)
|
||||||
{
|
{
|
||||||
tableContainer.Clear();
|
contentContainer.Clear();
|
||||||
loading.Hide();
|
loading.Hide();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadComponentAsync(table, t =>
|
LoadComponentAsync(content, t =>
|
||||||
{
|
{
|
||||||
loading.Hide();
|
loading.Hide();
|
||||||
tableContainer.Child = table;
|
contentContainer.Child = content;
|
||||||
}, (cancellationToken = new CancellationTokenSource()).Token);
|
}, (cancellationToken = new CancellationTokenSource()).Token);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user