diff --git a/www.rus/js/plugins/VND_ONSControls.js b/www.rus/js/plugins/VND_ONSControls.js index 3fdb569..7a86825 100644 --- a/www.rus/js/plugins/VND_ONSControls.js +++ b/www.rus/js/plugins/VND_ONSControls.js @@ -334,6 +334,12 @@ ONSControls.clearInteractive = function() { for (elem of this.getControlElements()) { elem.removeAllListeners(); } + // Clear status of VirtualGamepad + for (button of VirtualGamepad.gamepad.buttons) { + button.pressed = false; + button.touched = false; + button.value = 0; + } } //============================================================================= // * Setup drag'n drop events for element @@ -371,7 +377,7 @@ ONSControls.disableTouch = function() { ONSControls.replaceBackEvent = function() { document.addEventListener("backbutton", function(event){ event.preventDefault(); - this.closeEditMode(); + ONSControls.closeEditMode(); }); } //=============================================================================