mirror of
https://github.com/ppy/osu.git
synced 2024-09-21 19:27:24 +08:00
Rename another method
This commit is contained in:
parent
4c881b5633
commit
4a8273b6ed
@ -104,7 +104,7 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
scale = GetClampedScale(scale, actualOrigin);
|
scale = ClampScaleToPlayfieldBounds(scale, actualOrigin);
|
||||||
|
|
||||||
foreach (var (ho, originalState) in objectsInScale)
|
foreach (var (ho, originalState) in objectsInScale)
|
||||||
{
|
{
|
||||||
@ -173,7 +173,7 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
/// <param name="origin">The origin from which the scale operation is performed</param>
|
/// <param name="origin">The origin from which the scale operation is performed</param>
|
||||||
/// <param name="scale">The scale to be clamped</param>
|
/// <param name="scale">The scale to be clamped</param>
|
||||||
/// <returns>The clamped scale vector</returns>
|
/// <returns>The clamped scale vector</returns>
|
||||||
public Vector2 GetClampedScale(Vector2 scale, Vector2? origin = null)
|
public Vector2 ClampScaleToPlayfieldBounds(Vector2 scale, Vector2? origin = null)
|
||||||
{
|
{
|
||||||
//todo: this is not always correct for selections involving sliders. This approximation assumes each point is scaled independently, but sliderends move with the sliderhead.
|
//todo: this is not always correct for selections involving sliders. This approximation assumes each point is scaled independently, but sliderends move with the sliderhead.
|
||||||
if (objectsInScale == null)
|
if (objectsInScale == null)
|
||||||
|
@ -163,7 +163,7 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
const float max_scale = 10;
|
const float max_scale = 10;
|
||||||
var scale = scaleHandler.GetClampedScale(new Vector2(max_scale), getOriginPosition(scaleInfo.Value));
|
var scale = scaleHandler.ClampScaleToPlayfieldBounds(new Vector2(max_scale), getOriginPosition(scaleInfo.Value));
|
||||||
|
|
||||||
if (!scaleInfo.Value.XAxis)
|
if (!scaleInfo.Value.XAxis)
|
||||||
scale.X = max_scale;
|
scale.X = max_scale;
|
||||||
|
Loading…
Reference in New Issue
Block a user