private void HandleRectSideScalingHandles()
{
if (this.selected != null)
{
Rect rect = new Rect(this.selected.m_Rect);
float xMin = rect.xMin;
float xMax = rect.xMax;
float yMax = rect.yMax;
float yMin = rect.yMin;
Vector2 vector = Handles.matrix.MultiplyPoint(new Vector3(rect.xMin, rect.yMin));
Vector2 vector2 = Handles.matrix.MultiplyPoint(new Vector3(rect.xMax, rect.yMax));
float width = Mathf.Abs((float) (vector2.x - vector.x));
float height = Mathf.Abs((float) (vector2.y - vector.y));
EditorGUI.BeginChangeCheck();
xMin = this.HandleBorderScaleSlider(xMin, rect.yMax, width, height, true);
xMax = this.HandleBorderScaleSlider(xMax, rect.yMax, width, height, true);
yMax = this.HandleBorderScaleSlider(rect.xMin, yMax, width, height, false);
yMin = this.HandleBorderScaleSlider(rect.xMin, yMin, width, height, false);
if (EditorGUI.EndChangeCheck())
{
Undo.RegisterCompleteObjectUndo(this.m_RectsCache, "Scale sprite");
rect.xMin = xMin;
rect.xMax = xMax;
rect.yMax = yMax;
rect.yMin = yMin;
this.selected.m_Rect = this.ClampSpriteRect(rect);
this.selected.m_Border = this.ClampSpriteBorder(this.selected.m_Border);
this.textureIsDirty = true;
}
}
}