- Joined
- Apr 20, 2019
- Messages
- 184
- Reaction score
- 13
- First Language
- Spanish
- Primarily Uses
- RMMV
Basically, I'm having the same problem as these two guys(1,2).
It seems like I'll have to make a couple of changes to rpg_core.js.
Probably here:
I've tried my best but I can't figure it out, could someone write a code similar to
TouchInput.isPressed = function() {
return this._mousePressed || this._screenPressed;
};
but for the "Cancelled" button?
It seems like I'll have to make a couple of changes to rpg_core.js.
Probably here:
Code:
* Checks whether the mouse button or touchscreen is currently pressed down.
*
* @static
* @method isPressed
* @return {Boolean} True if the mouse button or touchscreen is pressed
*/
TouchInput.isPressed = function() {
return this._mousePressed || this._screenPressed;
};
/**
* Checks whether the left mouse button or touchscreen is just pressed.
*
* @static
* @method isTriggered
* @return {Boolean} True if the mouse button or touchscreen is triggered
*/
TouchInput.isTriggered = function() {
return this._triggered;
};
/**
* Checks whether the left mouse button or touchscreen is just pressed
* or a pseudo key repeat occurred.
*
* @static
* @method isRepeated
* @return {Boolean} True if the mouse button or touchscreen is repeated
*/
TouchInput.isRepeated = function() {
return (this.isPressed() &&
(this._triggered ||
(this._pressedTime >= this.keyRepeatWait &&
this._pressedTime % this.keyRepeatInterval === 0)));
};
/**
* Checks whether the left mouse button or touchscreen is kept depressed.
*
* @static
* @method isLongPressed
* @return {Boolean} True if the left mouse button or touchscreen is long-pressed
*/
TouchInput.isLongPressed = function() {
return this.isPressed() && this._pressedTime >= this.keyRepeatWait;
};
/**
* Checks whether the right mouse button is just pressed.
*
* @static
* @method isCancelled
* @return {Boolean} True if the right mouse button is just pressed
*/
TouchInput.isCancelled = function() {
return this._cancelled;
};
/**
* Checks whether the mouse or a finger on the touchscreen is moved.
*
* @static
* @method isMoved
* @return {Boolean} True if the mouse or a finger on the touchscreen is moved
*/
TouchInput.isMoved = function() {
return this._moved;
};
/**
* Checks whether the left mouse button or touchscreen is released.
*
* @static
* @method isReleased
* @return {Boolean} True if the mouse button or touchscreen is released
*/
TouchInput.isReleased = function() {
return this._released;
};
I've tried my best but I can't figure it out, could someone write a code similar to
TouchInput.isPressed = function() {
return this._mousePressed || this._screenPressed;
};
but for the "Cancelled" button?



