osu-side changes

This commit is contained in:
smoogipoo
2020-02-24 20:52:15 +09:00
parent 66317f9fcd
commit 6c28fd21c7
8 changed files with 34 additions and 81 deletions

View File

@ -6,6 +6,7 @@ using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Caching;
using osu.Framework.Graphics;
using osu.Framework.Layout;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Objects.Types;
@ -19,11 +20,13 @@ namespace osu.Game.Rulesets.UI.Scrolling
[Resolved]
private IScrollingInfo scrollingInfo { get; set; }
private readonly Cached initialStateCache = new Cached();
private readonly LayoutValue initialStateCache = new LayoutValue(Invalidation.RequiredParentSizeToFit | Invalidation.DrawInfo);
public ScrollingHitObjectContainer()
{
RelativeSizeAxes = Axes.Both;
AddLayout(initialStateCache);
}
[BackgroundDependencyLoader]
@ -55,14 +58,6 @@ namespace osu.Game.Rulesets.UI.Scrolling
return result;
}
public override bool Invalidate(Invalidation invalidation = Invalidation.All, Drawable source = null, bool shallPropagate = true)
{
if ((invalidation & (Invalidation.RequiredParentSizeToFit | Invalidation.DrawInfo)) > 0)
initialStateCache.Invalidate();
return base.Invalidate(invalidation, source, shallPropagate);
}
private float scrollLength;
protected override void Update()