Aar0n 我的dialog a是一个list,点击其中的任何一个list item,触发方法:
private onSelect(index:number):void
{
console.log("当前选择的索引:" + index);
//this.theItem = new DlgNote2();
//this.theItem.popup();
Laya.Scene.open("note2Dlg.scene");
}
——就是这里:我希望打开b的时候,a是在b的后面遮罩中存在的。这样当我关闭b的时候,a还是存在,并能继续浏览list,或者打开另外一个list item啊。
打开 dialog b 。b的构造方法:
constructor() {
super();
console.log(" Here is DlgNote2");
this.closeEffect = null;
this.closeBtn.on(Laya.Event.CLICK, this, this.toClose);
//this.show();
}
b的关闭方法:
toClose():void{
//Laya.Scene.open("datiPage.scene");
this.close();
}
a和b都是独立的ts类,
export default class a extends ui.a {……}
同时a和b都是对应的dialog ui文件a.scene 和b.scene的runtime属性关联过去的。