Add cursor availability

Rewrite the draw loop so it handles a cursor if being used.