You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you add CanvasInput.hide and CanvasInput.unhide methods that set the rendered objects to visible or invisible (and simultaneously disable input)?
This would make the CanvasInput library act more like the other text objects already being used in the Phaser library.
I use the CanvasInput method as a text input box along with other Phaser.game text objects. I have a .hide() method that sets a field for text objects and makes them invisible:
visible=false.
However, I can't apply this same method to the text input box inheriting from CanvasInput.
The text was updated successfully, but these errors were encountered:
this.hide = function() {
//hide all window elements and turn off their Inputs
for (var i = 0; i < this.elements.length; i++) {
this.elements[i].visible = false;
}
for (var i = 0; i < this.inputs.length; i++) {
this.inputs[i].InputEnabled = false;
}
return this;
}
this.unhide = function(activeWindow) {
try {activeWindow.hide();}
catch(e) {console.log(e);};
//unhide this window's elements:
for (var i = 0; i < this.elements.length; i++) {
this.elements[i].visible = true;
}
for (var i = 0; i < this.inputs.length; i++) {
this.inputs[i].InputEnabled = true;
}
//return the unhidden window:
return this;
}
Can you add CanvasInput.hide and CanvasInput.unhide methods that set the rendered objects to visible or invisible (and simultaneously disable input)?
This would make the CanvasInput library act more like the other text objects already being used in the Phaser library.
I use the CanvasInput method as a text input box along with other Phaser.game text objects. I have a .hide() method that sets a field for text objects and makes them invisible:
visible=false.
However, I can't apply this same method to the text input box inheriting from CanvasInput.
The text was updated successfully, but these errors were encountered: