AltimitSystems / mv-android-client

RPG Maker MV unofficial Android client
http://www.hbgames.org/forums/viewtopic.php?f=48&t=79391
Apache License 2.0
115 stars 36 forks source link

Can't desactivate touch screen release #22

Closed Voldre closed 4 years ago

Voldre commented 4 years ago

Hey, I write today on Github to you about the MV Android client. I got a problem : I can't desactive the release touch screen. When we remove the finger on the screen, the game detect it and do an action.

I have edited some parameters in rpgcore.js, like the Touch_Imput release, I have tested the Yanfly Engine Program : Touch Imput Disabler, but nothing work.

That is why I think that the problem isn't in the project, because in Windows we haven't this bug when the mouse touch is release.

So, the problem may come from the runtime client?

Thank's for your help!

felixjones commented 4 years ago

The MV Android Client contains no code related to touch input, it uses whatever system MV provides.

Voldre commented 4 years ago

I work 10 hours more and I find the problem, so I post it in this issue for anybody else who have it. Go to the rpgcore.js to lines 2800 (on average) and find : TouchInput.isTriggered = function() { return this._triggered; }; You must add to it a conditional before "return this.triggered". That is the code : TouchInput.isTriggered = function() { if (this._pressedTime !=0) { return this._triggered;} }; Explication : the trigger is the code that allow the touchscreen to be played, if you don't write it, your finger will never work. However, in Android (for me), if it have no condition, so the triggered always work, it will do the "double click" by pressing and releasing. So, you must remove the releasing click by add a condition "triggered always work, except when the timer of press (the touchscreen is pressing, variable "pressedTime"), is to 0." In fact, when you release your finger, in rpgcore.js, the pressedTime value go back to 0, and in this case, the trigger do another pulse and the click of the finger release appears.

However, the Windows version work perfectly without this adding, I don't know why the Android Version has problems, maybe it's because of my plugins? I don't know, but not it works.

That is all, hoping to help others!