Disable All Mouse Input Controls
A nice simple plugin that does exactly what it says on the tin.It fully disables mouse input including :
Clicking
Wheel
The only thing the mouse works on is pressing the X button to close the game
P.S this is my first rpg maker mv plugin any response is good responses thanks
Terms of Use : can be used for any project so long as im credited in some way
JavaScript:
/*:
* @plugindesc Fully disables all mouse and touch input. Keyboard and gamepad still work. v1.0
* @author Stuart - BUZZ GAMES
*
* @help
* This plugin disables:
* - Left click
* - Right click
* - Middle click
* - Touch/tap input
* - Mouse movement input
* - Mouse wheel input
* - Map click movement
* - Menu interaction by mouse
*
* Keyboard and gamepad remain functional.
*
* No plugin commands.
*/
(function() {
"use strict";
// Disable touch/mouse trigger detection
TouchInput.isPressed = function() {
return false;
};
TouchInput.isTriggered = function() {
return false;
};
TouchInput.isRepeated = function() {
return false;
};
TouchInput.isLongPressed = function() {
return false;
};
TouchInput.isCancelled = function() {
return false;
};
TouchInput.isMoved = function() {
return false;
};
TouchInput.isReleased = function() {
return false;
};
// Prevent updating mouse/touch state entirely
TouchInput._onMouseDown = function() {};
TouchInput._onMouseMove = function() {};
TouchInput._onMouseUp = function() {};
TouchInput._onWheel = function() {};
TouchInput._onTouchStart = function() {};
TouchInput._onTouchMove = function() {};
TouchInput._onTouchEnd = function() {};
TouchInput._onTouchCancel = function() {};
TouchInput._onPointerDown = function() {};
// Prevent map clicking movement
Scene_Map.prototype.processMapTouch = function() {
// Disabled completely
};
})();
本贴来自国际rpgmaker官方论坛作者:stutheman处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/disable-all-mouse-input-controls.183434/
页:
[1]