mirror of
https://github.com/ppy/osu.git
synced 2024-12-17 05:13:21 +08:00
Rename methods to fit new changes better
This commit is contained in:
parent
19d8be4890
commit
d1da1d4079
@ -240,12 +240,12 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
points = originalConvexHull!;
|
points = originalConvexHull!;
|
||||||
|
|
||||||
foreach (var point in points)
|
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;
|
return scale;
|
||||||
|
|
||||||
// Clamps the scale vector s such that the point p scaled by s is within the rectangle defined by lowerBounds and upperBounds
|
// 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;
|
p -= actualOrigin;
|
||||||
lowerBounds -= actualOrigin;
|
lowerBounds -= actualOrigin;
|
||||||
|
@ -175,7 +175,7 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
axisBindable.Disabled = !available;
|
axisBindable.Disabled = !available;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateMaxScale()
|
private void updateMinMaxScale()
|
||||||
{
|
{
|
||||||
if (!scaleHandler.OriginalSurroundingQuad.HasValue)
|
if (!scaleHandler.OriginalSurroundingQuad.HasValue)
|
||||||
return;
|
return;
|
||||||
@ -205,7 +205,7 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
private void setOrigin(ScaleOrigin origin)
|
private void setOrigin(ScaleOrigin origin)
|
||||||
{
|
{
|
||||||
scaleInfo.Value = scaleInfo.Value with { Origin = origin };
|
scaleInfo.Value = scaleInfo.Value with { Origin = origin };
|
||||||
updateMaxScale();
|
updateMinMaxScale();
|
||||||
updateAxisCheckBoxesEnabled();
|
updateAxisCheckBoxesEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -237,14 +237,14 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
private void setAxis(bool x, bool y)
|
private void setAxis(bool x, bool y)
|
||||||
{
|
{
|
||||||
scaleInfo.Value = scaleInfo.Value with { XAxis = x, YAxis = y };
|
scaleInfo.Value = scaleInfo.Value with { XAxis = x, YAxis = y };
|
||||||
updateMaxScale();
|
updateMinMaxScale();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PopIn()
|
protected override void PopIn()
|
||||||
{
|
{
|
||||||
base.PopIn();
|
base.PopIn();
|
||||||
scaleHandler.Begin();
|
scaleHandler.Begin();
|
||||||
updateMaxScale();
|
updateMinMaxScale();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PopOut()
|
protected override void PopOut()
|
||||||
|
Loading…
Reference in New Issue
Block a user