1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:28:00 +08:00

Push private methods down

This commit is contained in:
Dean Herbert 2021-06-01 14:01:08 +09:00
parent 3ff97f787a
commit 6e4730652e

View File

@ -36,6 +36,52 @@ namespace osu.Game.Overlays
{ {
} }
public void ShowPage(string pagePath = index_path)
{
path.Value = pagePath.Trim('/');
Show();
}
protected override WikiHeader CreateHeader() => new WikiHeader
{
ShowIndexPage = () => ShowPage(),
ShowParentPage = showParentPage,
};
protected override void LoadComplete()
{
base.LoadComplete();
path.BindValueChanged(onPathChanged);
wikiData.BindTo(Header.WikiPageData);
}
protected override void PopIn()
{
base.PopIn();
if (displayUpdateRequired)
{
path.TriggerChange();
displayUpdateRequired = false;
}
}
protected override void PopOutComplete()
{
base.PopOutComplete();
displayUpdateRequired = true;
}
protected void LoadDisplay(Drawable display)
{
ScrollFlow.ScrollToStart();
LoadComponentAsync(display, loaded =>
{
Child = loaded;
Loading.Hide();
}, (cancellationToken = new CancellationTokenSource()).Token);
}
private void onPathChanged(ValueChangedEvent<string> e) private void onPathChanged(ValueChangedEvent<string> e)
{ {
cancellationToken?.Cancel(); cancellationToken?.Cancel();
@ -92,52 +138,6 @@ namespace osu.Game.Overlays
ShowPage(parentPath); ShowPage(parentPath);
} }
public void ShowPage(string pagePath = index_path)
{
path.Value = pagePath.Trim('/');
Show();
}
protected override WikiHeader CreateHeader() => new WikiHeader
{
ShowIndexPage = () => ShowPage(),
ShowParentPage = showParentPage,
};
protected override void LoadComplete()
{
base.LoadComplete();
path.BindValueChanged(onPathChanged);
wikiData.BindTo(Header.WikiPageData);
}
protected override void PopIn()
{
base.PopIn();
if (displayUpdateRequired)
{
path.TriggerChange();
displayUpdateRequired = false;
}
}
protected override void PopOutComplete()
{
base.PopOutComplete();
displayUpdateRequired = true;
}
protected void LoadDisplay(Drawable display)
{
ScrollFlow.ScrollToStart();
LoadComponentAsync(display, loaded =>
{
Child = loaded;
Loading.Hide();
}, (cancellationToken = new CancellationTokenSource()).Token);
}
protected override void Dispose(bool isDisposing) protected override void Dispose(bool isDisposing)
{ {
cancellationToken?.Cancel(); cancellationToken?.Cancel();