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