mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 13:32:54 +08:00
Push private methods down
This commit is contained in:
parent
3ff97f787a
commit
6e4730652e
@ -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)
|
||||
{
|
||||
cancellationToken?.Cancel();
|
||||
@ -92,52 +138,6 @@ namespace osu.Game.Overlays
|
||||
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)
|
||||
{
|
||||
cancellationToken?.Cancel();
|
||||
|
Loading…
Reference in New Issue
Block a user