PIXI Control: Clear VirtualGamepad with interactive

This commit is contained in:
OleSTEEP 2024-02-15 22:41:57 +03:00
parent 9489e0533e
commit f218aed9da

View file

@ -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();
});
}
//=============================================================================