What is the best way to toggle a mouse-driven UI overlay?

Awesome. Glad you figured it out! BTW, we are currently working on making this set of tasks much easier with a higher-level API that expresses intent much more concisely.