Function ItemList.getItemAtPosition

Returns the item index at the given position. When there is no item at that point, -1 will be returned if exact is true, and the closest item index will be returned otherwise.

long getItemAtPosition (
  const(Vector2) position,
  const(bool) exact = false
) nothrow @nogc const;