If the switch slides too easily, all you need is a rail with mechanical detents. This is pretty easy to do, two parallel metal (or plastic if you like flimsy) plates sliding, notches in one plate, and a ball bearing with a channel behind it that has a spring to provide tension for the ball bearing.