Hi all, i use editbox in component Popup Layer. When i call hide popup, i call delaycall and when complete i call visible popup. But i see text of editbox visible, but other image not visible. Why? Please see picture and code
this.txtEditMoneyTai = new cc.EditBox(cc.size(200, 70), new cc.Scale9Sprite(“Image/button.png”, new cc.Rect(54, 18, 90, 40)));
this.txtEditMoneyTai.font = res.RobotoBold;
this.txtEditMoneyTai.fontName = “Roboto-Bold”;
this.txtEditMoneyTai.fontSize = 16;
this.txtEditMoneyTai.setDelegate(this);
this.txtEditMoneyTai.setPlaceHolder(“0”);
this.txtEditMoneyTai.anchorX = 0;
this.txtEditMoneyTai.anchorY = 0;
this.txtEditMoneyTai.setInputMode(cc.EDITBOX_INPUT_MODE_PHONENUMBER);
this.addChild(this.txtEditMoneyTai);
this.txtEditMoneyTai.x = 300;
this.txtEditMoneyTai.y = 300;
var self = this;
setTimeout(function(){
self.visible = false;
}, 500);
I didn’t understand properly.
You have created Editbox.
When i call hide Popup, You need to hide Editbox.
When visible Pop up call, You need to make visible. Am i right?
Can you show the piece of code for implementation of Hide & Visible
Hi. I create a Layer Popup CreateRoom. Popup include a editbox ( passwork ) and button, label… When i show popup, i start timer countdown 5,4,3,2,1. When countdown = 0, i call popup.visible = false. But have bug same picture. Label editbox visible, but other component ( button, label, background editbox… ) not hide You understand?
I need hide all popup, i use self = this, this is popup. i use self.visible = false. If popup not addChild editbox. popup is visible. but i add edibox, popup not visible you understand? I think you create project test. You understand now