···1616 /// Has the ability to delay the loading until it has been visible on-screen for a specified duration.
1717 /// In order to benefit from delayed load, we must be inside a <see cref="ScrollContainer{T}"/>.
1818 /// </summary>
1919- /// <remarks>
2020- /// <see cref="LifetimeStart"/> and <see cref="LifetimeEnd"/> are propagated from the wrapper to the content on content load.
2121- /// After load, the content's lifetime is preferred, meaning any changes to content's lifetime post-load will be respected.
2222- /// </remarks>
2319 public class DelayedLoadWrapper : CompositeDrawable
2420 {
2521 [Resolved]
···58545955 AddLayout(optimisingContainerCache);
6056 AddLayout(isIntersectingCache);
6161- }
6262-6363- private double lifetimeStart = double.MinValue;
6464-6565- public override double LifetimeStart
6666- {
6767- get => Content?.LifetimeStart ?? lifetimeStart;
6868- set
6969- {
7070- if (Content != null)
7171- Content.LifetimeStart = value;
7272- lifetimeStart = value;
7373- }
7474- }
7575-7676- private double lifetimeEnd = double.MaxValue;
7777-7878- public override double LifetimeEnd
7979- {
8080- get => Content?.LifetimeEnd ?? lifetimeEnd;
8181- set
8282- {
8383- if (Content != null)
8484- Content.LifetimeEnd = value;
8585- lifetimeEnd = value;
8686- }
8757 }
88588959 private Drawable content;
···160130 // This code is running on the game's scheduler, while this DLW may have been async disposed, so the addition is scheduled locally to prevent adding to disposed DLWs.
161131 scheduledAddition = Schedule(() =>
162132 {
163163- content.LifetimeStart = lifetimeStart;
164164- content.LifetimeEnd = lifetimeEnd;
165165-166133 AddInternal(content);
167134168135 DelayedLoadCompleted = true;