move some drawing stuff before lua (fixes chatbox background); fix clear sim position in mod; fix chatbox input handling (relied on broken tpt++ mouse handling), this also fixes the tpt++ bug where if you released the mouse behind the chatbox you would never stop drawing