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

Merge branch 'master' into math_clamp

This commit is contained in:
Dan Balasescu 2019-11-21 11:08:56 +09:00 committed by GitHub
commit a7c074ff37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 5 deletions

View File

@ -517,6 +517,12 @@ namespace osu.Game.Rulesets.UI
public BindableDouble Frequency => throw new NotImplementedException();
public IBindable<double> AggregateVolume => throw new NotImplementedException();
public IBindable<double> AggregateBalance => throw new NotImplementedException();
public IBindable<double> AggregateFrequency => throw new NotImplementedException();
public int PlaybackConcurrency
{
get => throw new NotImplementedException();

View File

@ -452,9 +452,6 @@ namespace osu.Game.Screens.Select
if (!itemsCache.IsValid)
updateItems();
if (!scrollPositionCache.IsValid)
updateScrollPosition();
// Remove all items that should no longer be on-screen
scrollableContent.RemoveAll(p => p.Y < visibleUpperBound - p.DrawHeight || p.Y > visibleBottomBound || !p.IsPresent);
@ -519,6 +516,14 @@ namespace osu.Game.Screens.Select
updateItem(p);
}
protected override void UpdateAfterChildren()
{
base.UpdateAfterChildren();
if (!scrollPositionCache.IsValid)
updateScrollPosition();
}
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
@ -637,8 +642,11 @@ namespace osu.Game.Screens.Select
private void updateScrollPosition()
{
if (scrollTarget != null) scroll.ScrollTo(scrollTarget.Value);
scrollPositionCache.Validate();
if (scrollTarget != null)
{
scroll.ScrollTo(scrollTarget.Value);
scrollPositionCache.Validate();
}
}
/// <summary>