Lock Mouse in Window

I added 2 options to lock the mouse in the window, one is to lock the
mouse only when you are moving, and the other is to lock the mouse in
the window all the time (during a game)