mirror of
https://github.com/ppy/osu.git
synced 2025-02-16 05:03:02 +08:00
Move private methods down
This commit is contained in:
parent
713f69ea55
commit
ac8efdeabd
@ -24,6 +24,8 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
private CancellationTokenSource cancellationToken;
|
private CancellationTokenSource cancellationToken;
|
||||||
|
|
||||||
|
private bool displayUpdateRequired = true;
|
||||||
|
|
||||||
public NewsOverlay()
|
public NewsOverlay()
|
||||||
: base(OverlayColourScheme.Purple, false)
|
: base(OverlayColourScheme.Purple, false)
|
||||||
{
|
{
|
||||||
@ -72,8 +74,6 @@ namespace osu.Game.Overlays
|
|||||||
ShowFrontPage = ShowFrontPage
|
ShowFrontPage = ShowFrontPage
|
||||||
};
|
};
|
||||||
|
|
||||||
private bool displayUpdateRequired = true;
|
|
||||||
|
|
||||||
protected override void PopIn()
|
protected override void PopIn()
|
||||||
{
|
{
|
||||||
base.PopIn();
|
base.PopIn();
|
||||||
@ -109,6 +109,23 @@ namespace osu.Game.Overlays
|
|||||||
Show();
|
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)
|
private void onArticleChanged(ValueChangedEvent<string> e)
|
||||||
{
|
{
|
||||||
if (e.NewValue == null)
|
if (e.NewValue == null)
|
||||||
@ -149,23 +166,6 @@ namespace osu.Game.Overlays
|
|||||||
Loading.Show();
|
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)
|
protected override void Dispose(bool isDisposing)
|
||||||
{
|
{
|
||||||
cancellationToken?.Cancel();
|
cancellationToken?.Cancel();
|
||||||
|
Loading…
Reference in New Issue
Block a user