1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-04 14:25:42 +08:00

Bypass Parent nullability checks for now

This commit is contained in:
Dean Herbert
2023-10-17 17:40:44 +09:00
Unverified
parent 5833c20be5
commit 5341a335a6
50 changed files with 77 additions and 77 deletions
@@ -76,10 +76,10 @@ namespace osu.Game.Graphics.Containers
/// <remarks>Will only be correct if the logo's <see cref="Drawable.RelativePositionAxes"/> are set to Axes.Both</remarks>
protected Vector2 ComputeLogoTrackingPosition()
{
var absolutePos = Logo.Parent.ToLocalSpace(LogoFacade.ScreenSpaceDrawQuad.Centre);
var absolutePos = Logo.Parent!.ToLocalSpace(LogoFacade.ScreenSpaceDrawQuad.Centre);
return new Vector2(absolutePos.X / Logo.Parent.RelativeToAbsoluteFactor.X,
absolutePos.Y / Logo.Parent.RelativeToAbsoluteFactor.Y);
return new Vector2(absolutePos.X / Logo.Parent!.RelativeToAbsoluteFactor.X,
absolutePos.Y / Logo.Parent!.RelativeToAbsoluteFactor.Y);
}
protected override void Update()
@@ -48,7 +48,7 @@ namespace osu.Game.Graphics.Containers
private void keepUprightAndUnstretched()
{
// Decomposes the inverse of the parent DrawInfo.Matrix into rotation, shear and scale.
var parentMatrix = Parent.DrawInfo.Matrix;
var parentMatrix = Parent!.DrawInfo.Matrix;
// Remove Translation.>
parentMatrix.M31 = 0.0f;
@@ -178,7 +178,7 @@ namespace osu.Game.Graphics.Containers
// We can not use RelativeSizeAxes for Height, because the height
// of our parent diminishes as the content moves up.
Height = Parent.Parent.DrawSize.Y * 1.5f;
Height = Parent!.Parent!.DrawSize.Y * 1.5f;
}
protected override void PopIn() => Schedule(() => this.MoveToY(FinalPosition, APPEAR_DURATION, easing_show));
@@ -188,7 +188,7 @@ namespace osu.Game.Graphics.Containers
double duration = IsLoaded ? DISAPPEAR_DURATION : 0;
// scheduling is required as parent may not be present at the time this is called.
Schedule(() => this.MoveToY(Parent.Parent.DrawSize.Y, duration, easing_hide));
Schedule(() => this.MoveToY(Parent!.Parent!.DrawSize.Y, duration, easing_hide));
}
}
}