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

@ -3,10 +3,10 @@
using System;
using osu.Framework.Allocation;
using osu.Framework.Caching;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Containers;
using osu.Framework.Layout;
using osu.Game.Graphics;
using osu.Game.Rulesets.Edit;
using osuTK;
@ -51,7 +51,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
[Resolved]
private BindableBeatDivisor beatDivisor { get; set; }
private readonly Cached gridCache = new Cached();
private readonly LayoutValue gridCache = new LayoutValue(Invalidation.RequiredParentSizeToFit);
private readonly double? endTime;
/// <summary>
@ -67,6 +67,8 @@ namespace osu.Game.Screens.Edit.Compose.Components
StartTime = startTime;
RelativeSizeAxes = Axes.Both;
AddLayout(gridCache);
}
protected override void LoadComplete()
@ -92,14 +94,6 @@ namespace osu.Game.Screens.Edit.Compose.Components
gridCache.Invalidate();
}
public override bool Invalidate(Invalidation invalidation = Invalidation.All, Drawable source = null, bool shallPropagate = true)
{
if ((invalidation & Invalidation.RequiredParentSizeToFit) > 0)
gridCache.Invalidate();
return base.Invalidate(invalidation, source, shallPropagate);
}
protected override void Update()
{
base.Update();