1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-17 05:22:54 +08:00

Rename methods to fit new changes better

This commit is contained in:
Bartłomiej Dach 2024-10-11 15:03:30 +02:00
parent 19d8be4890
commit d1da1d4079
No known key found for this signature in database
2 changed files with 6 additions and 6 deletions

View File

@ -240,12 +240,12 @@ namespace osu.Game.Rulesets.Osu.Edit
points = originalConvexHull!;
foreach (var point in points)
scale = clampToBound(scale, point, Vector2.Zero, OsuPlayfield.BASE_SIZE);
scale = clampToBounds(scale, point, Vector2.Zero, OsuPlayfield.BASE_SIZE);
return scale;
// Clamps the scale vector s such that the point p scaled by s is within the rectangle defined by lowerBounds and upperBounds
Vector2 clampToBound(Vector2 s, Vector2 p, Vector2 lowerBounds, Vector2 upperBounds)
Vector2 clampToBounds(Vector2 s, Vector2 p, Vector2 lowerBounds, Vector2 upperBounds)
{
p -= actualOrigin;
lowerBounds -= actualOrigin;

View File

@ -175,7 +175,7 @@ namespace osu.Game.Rulesets.Osu.Edit
axisBindable.Disabled = !available;
}
private void updateMaxScale()
private void updateMinMaxScale()
{
if (!scaleHandler.OriginalSurroundingQuad.HasValue)
return;
@ -205,7 +205,7 @@ namespace osu.Game.Rulesets.Osu.Edit
private void setOrigin(ScaleOrigin origin)
{
scaleInfo.Value = scaleInfo.Value with { Origin = origin };
updateMaxScale();
updateMinMaxScale();
updateAxisCheckBoxesEnabled();
}
@ -237,14 +237,14 @@ namespace osu.Game.Rulesets.Osu.Edit
private void setAxis(bool x, bool y)
{
scaleInfo.Value = scaleInfo.Value with { XAxis = x, YAxis = y };
updateMaxScale();
updateMinMaxScale();
}
protected override void PopIn()
{
base.PopIn();
scaleHandler.Begin();
updateMaxScale();
updateMinMaxScale();
}
protected override void PopOut()