Hiya!
As the title says: is there any way to disable a sprite button temporarily? (And activate it later?) Like with this._randomWindow.deactivate(); but for the mouse input?
I'm trying to set up a couple of windows on the Title Screen, and I could disable the mouse alltogether but I'd rather not.
I found this piece of code so I gueeess it's possible but I just can't find the necessary word. I tried with invisible but it didn't exist xD
As the title says: is there any way to disable a sprite button temporarily? (And activate it later?) Like with this._randomWindow.deactivate(); but for the mouse input?
I'm trying to set up a couple of windows on the Title Screen, and I could disable the mouse alltogether but I'd rather not.
I found this piece of code so I gueeess it's possible but I just can't find the necessary word. I tried with invisible but it didn't exist xD
Code:
Sprite_Button.prototype.processTouch = function() {
if (this.isActive()) {
if (TouchInput.isTriggered() && this.isButtonTouched()) {
this._touching = true;
}
if (this._touching) {
if (TouchInput.isReleased() || !this.isButtonTouched()) {
this._touching = false;
if (TouchInput.isReleased()) {
this.callClickHandler();
}
}
}
} else {
this._touching = false;
}
};
Sprite_Button.prototype.isActive = function() {
var node = this;
while (node) {
if (!node.visible) {
return false;
}
node = node.parent;
}
return true;
};