mirror of
https://github.com/SK-la/osu-framework.git
synced 2026-03-15 03:20:30 +00:00
Send Invalidation type in internal Invalidated event flow
This commit is contained in:
@@ -299,7 +299,7 @@ namespace osu.Framework.Tests.Layout
|
||||
// Trigger a validation of draw size.
|
||||
Assert.That(child.DrawSize, Is.EqualTo(new Vector2(200)));
|
||||
|
||||
child.Invalidated += _ => invalidated = true;
|
||||
child.Invalidated += (_, _) => invalidated = true;
|
||||
});
|
||||
|
||||
AddStep("resize parent", () => parent.Size = new Vector2(400));
|
||||
@@ -328,7 +328,7 @@ namespace osu.Framework.Tests.Layout
|
||||
AddStep("make child dead", () =>
|
||||
{
|
||||
child.LifetimeStart = double.MaxValue;
|
||||
child.Invalidated += _ => invalidated = true;
|
||||
child.Invalidated += (_, _) => invalidated = true;
|
||||
});
|
||||
|
||||
// See above: won't cause an invalidation
|
||||
@@ -364,7 +364,7 @@ namespace osu.Framework.Tests.Layout
|
||||
}
|
||||
};
|
||||
|
||||
child.Invalidated += _ => invalidated = true;
|
||||
child.Invalidated += (_, _) => invalidated = true;
|
||||
});
|
||||
|
||||
AddStep("invalidate parent", () =>
|
||||
@@ -395,7 +395,7 @@ namespace osu.Framework.Tests.Layout
|
||||
Child = child = new Box { RelativeSizeAxes = Axes.Both }
|
||||
};
|
||||
|
||||
child.Invalidated += _ => invalidated = true;
|
||||
child.Invalidated += (_, _) => invalidated = true;
|
||||
});
|
||||
|
||||
AddStep("invalidate parent", () =>
|
||||
|
||||
@@ -421,7 +421,7 @@ namespace osu.Framework.Graphics
|
||||
/// <summary>.
|
||||
/// Fired after the <see cref="Invalidate"/> method is called.
|
||||
/// </summary>
|
||||
internal event Action<Drawable> Invalidated;
|
||||
internal event Action<Drawable, Invalidation> Invalidated;
|
||||
|
||||
/// <summary>
|
||||
/// Fired after the <see cref="Dispose(bool)"/> method is called.
|
||||
@@ -1811,7 +1811,7 @@ namespace osu.Framework.Graphics
|
||||
if (anyInvalidated)
|
||||
InvalidationID++;
|
||||
|
||||
Invalidated?.Invoke(this);
|
||||
Invalidated?.Invoke(this, invalidation);
|
||||
|
||||
return anyInvalidated;
|
||||
}
|
||||
|
||||
@@ -407,7 +407,7 @@ namespace osu.Framework.Graphics.Visualisation
|
||||
|
||||
private void onLayout() => activityLayout.FadeOutFromOne(1);
|
||||
|
||||
private void onInvalidated(Drawable d) => activityInvalidate.FadeOutFromOne(1);
|
||||
private void onInvalidated(Drawable d, Invalidation invalidation) => activityInvalidate.FadeOutFromOne(1);
|
||||
|
||||
private void onDispose()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user