mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 13:22:55 +08:00
Throw exception when not relatively positioned
This commit is contained in:
parent
9f92b3a8ba
commit
3a1587fa53
@ -92,12 +92,15 @@ namespace osu.Game.Graphics.Containers
|
||||
if (Logo == null)
|
||||
return;
|
||||
|
||||
if (Logo.RelativePositionAxes != Axes.Both)
|
||||
throw new InvalidOperationException($"Tracking logo must have {nameof(RelativePositionAxes)} = Axes.Both");
|
||||
|
||||
// Account for the scale of the actual OsuLogo, as SizeForFlow only accounts for the sprite scale.
|
||||
((ExposedFacade)LogoFacade).SetSize(new Vector2(Logo.SizeForFlow * Logo.Scale.X));
|
||||
|
||||
var localPos = ComputeLogoTrackingPosition();
|
||||
|
||||
if (LogoFacade.Parent != null && Logo.Position != localPos && Logo.RelativePositionAxes == Axes.Both)
|
||||
if (LogoFacade.Parent != null && Logo.Position != localPos)
|
||||
{
|
||||
// If this is our first update since tracking has started, initialize our starting values for interpolation
|
||||
if (startTime == null || startPosition == null)
|
||||
|
Loading…
Reference in New Issue
Block a user