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

Move private methods down

This commit is contained in:
Dean Herbert 2021-05-20 14:12:34 +09:00
parent 713f69ea55
commit ac8efdeabd

View File

@ -24,6 +24,8 @@ namespace osu.Game.Overlays
private CancellationTokenSource cancellationToken;
private bool displayUpdateRequired = true;
public NewsOverlay()
: base(OverlayColourScheme.Purple, false)
{
@ -72,8 +74,6 @@ namespace osu.Game.Overlays
ShowFrontPage = ShowFrontPage
};
private bool displayUpdateRequired = true;
protected override void PopIn()
{
base.PopIn();
@ -109,6 +109,23 @@ namespace osu.Game.Overlays
Show();
}
protected void LoadDisplay(Drawable display)
{
ScrollFlow.ScrollToStart();
LoadComponentAsync(display, loaded =>
{
Child = loaded;
}, (cancellationToken = new CancellationTokenSource()).Token);
}
protected override void UpdateAfterChildren()
{
base.UpdateAfterChildren();
sidebarContainer.Height = DrawHeight;
sidebarContainer.Y = Math.Clamp(ScrollFlow.Current - Header.DrawHeight, 0, Math.Max(ScrollFlow.ScrollContent.DrawHeight - DrawHeight - Header.DrawHeight, 0));
}
private void onArticleChanged(ValueChangedEvent<string> e)
{
if (e.NewValue == null)
@ -149,23 +166,6 @@ namespace osu.Game.Overlays
Loading.Show();
}
protected void LoadDisplay(Drawable display)
{
ScrollFlow.ScrollToStart();
LoadComponentAsync(display, loaded =>
{
Child = loaded;
}, (cancellationToken = new CancellationTokenSource()).Token);
}
protected override void UpdateAfterChildren()
{
base.UpdateAfterChildren();
sidebarContainer.Height = DrawHeight;
sidebarContainer.Y = Math.Clamp(ScrollFlow.Current - Header.DrawHeight, 0, Math.Max(ScrollFlow.ScrollContent.DrawHeight - DrawHeight - Header.DrawHeight, 0));
}
protected override void Dispose(bool isDisposing)
{
cancellationToken?.Cancel();