gui callback for mode toggle.