PIXI Control: Clear VirtualGamepad with interactive
This commit is contained in:
parent
9489e0533e
commit
f218aed9da
1 changed files with 7 additions and 1 deletions
|
@ -334,6 +334,12 @@ ONSControls.clearInteractive = function() {
|
||||||
for (elem of this.getControlElements()) {
|
for (elem of this.getControlElements()) {
|
||||||
elem.removeAllListeners();
|
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
|
// * Setup drag'n drop events for element
|
||||||
|
@ -371,7 +377,7 @@ ONSControls.disableTouch = function() {
|
||||||
ONSControls.replaceBackEvent = function() {
|
ONSControls.replaceBackEvent = function() {
|
||||||
document.addEventListener("backbutton", function(event){
|
document.addEventListener("backbutton", function(event){
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
this.closeEditMode();
|
ONSControls.closeEditMode();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue