MZ A way for mouse to only be used in menu scenes, not to move in overworld (MZ)

Hey y'all! For a while I've had a beta tester talk about how they wish that they could use their mice to select buttons and scroll while in menu. I've been using a plugin by CT_Bolt that disables mouse movement, as it feels unprofessional and shows that my game is made in RPG Maker (Something that I'm trying to hide not out of shame, but just because sometimes RMMZ gets a bad rep). Does anyone know how to make it so that just mouse movement is disabled? Thanks in advance!

(Not sure if this is the right thread to post in, if not I'll be glad to change it.)
you can try to open the CTB_DisableTouchInputMZ and go to line 67.

replace the entire code with the following: (or add the missing line)
JavaScript:
    $_$['TouchInput.update'] = TouchInput.update;
    TouchInput.update = function() {
        if (SceneManager._scene instanceof Scene_Menu) return; // <= added line
        if (CTB.DisableTouchInputMZ.enabled) {$_$['TouchInput.update'].apply(this, arguments);};
    };

this should enable the mouse in the menu's (I don't own MZ so I cannot test it).
maybe you need to set if (!SceneManager._scene instanceof Scene_Menu) to enable it there.

otherwise, you can make a condition with else handler.
to make it true in menu, else whatever the update should be.
Alternatively, you could try saving this as a .js file and importing as a plugin:
JavaScript:
/*:
 * @target MZ
 * @plugindesc Disable map movement via touch controls.
 * @author Caethyril
 * @url https://forums.rpgmakerweb.com/posts/1315190/
 * @help Free to use and/or modify for any project, no credit required.
 */
// Override!
Game_Temp.prototype.setDestination = function() {};
Hey! I've worked in both of your code (Thanks a ton btw!), but it's odd. It works when in the submenus of the menu and the battle scenes, but it doesn't work for main menu (like the area where you select items, skills, etc.). Any idea what could be causing this? Idk how to attach a video, but if it would help I could try to attach a video.
If you're using my plugin then simply turn off the other plugins and save your project (to apply Plugin Manager changes) before testing. That's why I said "alternatively": my plugin replaces CTB's one.

If you're using ShadowDragon's suggestion, that's exactly what the added line does: it disables touch input updates on the pause menu (Scene_Menu). I might be wrong but I think that's the wrong approach, because even if you disabled it on the correct scene (Scene_Map), that would mean you wouldn't be able to use touch selection in events, e.g. Show Choices. 😴
Thank you so much! This totally worked!

Original thread: https://forums.rpgmakerweb.com/threads/a-way-for-mouse-to-only-be-used-in-menu-scenes-not-to-move-in-overworld-mz.176822/