public static float RotationSlider(int id, Vector3 cornerPos, float rotation, Vector3 pivot, Vector3 handleDir, Vector3 outwardsDir1, Vector3 outwardsDir2, float handleSize, Handles.CapFunction drawFunc, Vector2 snap)
{
Vector3 vector = outwardsDir1 + outwardsDir2;
Vector2 vector2 = HandleUtility.WorldToGUIPoint(cornerPos);
Vector2 vector3 = HandleUtility.WorldToGUIPoint(cornerPos + vector) - vector2;
vector3 = (Vector2) (vector3.normalized * 15f);
RaycastGUIPointToWorldHit(vector2 + vector3, new Plane(handleDir, cornerPos), out cornerPos);
Event current = Event.current;
Vector3 vector4 = Handles.Slider2D(id, cornerPos, handleDir, outwardsDir1, outwardsDir2, handleSize, drawFunc, Vector2.zero);
if (current.type == EventType.MouseMove)
{
DetectCursorChange(id);
}
if ((current.type == EventType.Repaint) && (((HandleUtility.nearestControl == id) && (GUIUtility.hotControl == 0)) || (GUIUtility.hotControl == id)))
{
Rect position = new Rect(current.mousePosition.x - 100f, current.mousePosition.y - 100f, 200f, 200f);
EditorGUIUtility.AddCursorRect(position, MouseCursor.RotateArrow);
}
return (rotation - AngleAroundAxis(vector4 - pivot, cornerPos - pivot, handleDir));
}