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.
Note: The returned value is unreliable if called right after modifying the
ItemList, before it redraws in the next frame.