Readded mouse handling support. The editor is basically usable now.