Skip to content

Commit

Permalink
Fix typo in field name
Browse files Browse the repository at this point in the history
  • Loading branch information
Marvin Schürz committed Oct 1, 2024
1 parent 8c109bb commit 1c18f31
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions osu.Framework/Graphics/Sprites/NineSliceSprite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public MarginPadding TextureInset
}
}

private Axes textureTextureInsetRelativeAxes;
private Axes textureInsetRelativeAxes;

/// <summary>
/// Controls which <see cref="Axes"/> of <see cref="TextureInset"/> are relative w.r.t.
Expand All @@ -70,29 +70,29 @@ public MarginPadding TextureInset
/// </remarks>
public Axes TextureInsetRelativeAxes
{
get => textureTextureInsetRelativeAxes;
get => textureInsetRelativeAxes;
set
{
if (textureTextureInsetRelativeAxes == value)
if (textureInsetRelativeAxes == value)
return;

Vector2 textureSize = Texture.DisplaySize;

Vector2 conversion = Vector2.One;

if ((value & Axes.X) > 0 && (textureTextureInsetRelativeAxes & Axes.X) == 0)
if ((value & Axes.X) > 0 && (textureInsetRelativeAxes & Axes.X) == 0)
conversion.X = Precision.AlmostEquals(textureSize.X, 0) ? 0 : 1 / textureSize.X;
else if ((value & Axes.X) == 0 && (textureTextureInsetRelativeAxes & Axes.X) > 0)
else if ((value & Axes.X) == 0 && (textureInsetRelativeAxes & Axes.X) > 0)
conversion.X = textureSize.X;

if ((value & Axes.Y) > 0 && (textureTextureInsetRelativeAxes & Axes.Y) == 0)
if ((value & Axes.Y) > 0 && (textureInsetRelativeAxes & Axes.Y) == 0)
conversion.Y = Precision.AlmostEquals(textureSize.Y, 0) ? 0 : 1 / textureSize.Y;
else if ((value & Axes.Y) == 0 && (textureTextureInsetRelativeAxes & Axes.Y) > 0)
else if ((value & Axes.Y) == 0 && (textureInsetRelativeAxes & Axes.Y) > 0)
conversion.Y = textureSize.Y;

textureInset *= conversion;

textureTextureInsetRelativeAxes = value;
textureInsetRelativeAxes = value;

invalidateGeometry();
}
Expand Down

0 comments on commit 1c18f31

Please sign in to comment.