Mouse enabled just not for movement

What would be the script so that people can still use the mouse in menu etc but it won't move them on the map.


Any direct help or possible directions would be amazing.
Yanfly's Picture Common Events lets you block the mouse movement like this... I'm not sure if there is one separate just for this though. There must be.
Great work around thanks
Game_Player.prototype.moveByInput = function() {
var direction = this.getInputDirection();
if (!this.isMoving() && this.canMove() && direction > 0) {
$gameTemp.clearDestination();
this.executeMove(direction);
}
};


EDIT:


Didn't check if


$gameTemp.clearDestination();


is needed for interrupting move route, otherwise this line can be removed.
Ah, even though now I think I will use the plugin this was what I was originally looking for thank you!

Original thread: https://forums.rpgmakerweb.com/threads/mouse-enabled-just-not-for-movement.68934/