/// <summary>
/// Sets the current position of the mouse.
/// </summary>
/// This function sets the current position of the mouse
/// cursor relative to a window.
/// <param name="position">New position of the mouse</param>
/// <param name="relativeTo">Reference window</param>
public static void SetPosition(Vector2i position, Window relativeTo = null)
{
if (relativeTo != null)
{
relativeTo.InternalSetMousePosition(position);
}
else
{
sfMouse_setPosition(position, IntPtr.Zero);
}
}