|
@@ -10,6 +10,7 @@ export class bag_avatar_preview extends base_ui {
|
|
|
@property(Node) img_avatar_border:Node = null
|
|
|
@property(Node) btn_close:Node = null
|
|
|
@property(Node) btn_true:Node = null
|
|
|
+ private m_true_cb = null
|
|
|
start() {
|
|
|
this.onButtonListen(this.btn_close, ()=>{
|
|
|
this.close()
|
|
@@ -19,17 +20,15 @@ export class bag_avatar_preview extends base_ui {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- initView() {
|
|
|
+ initView(true_cb) {
|
|
|
+ this.m_true_cb = true_cb
|
|
|
tools.loadRemoteImg(userDataManager.user_data.avatarUrl, (d)=>{
|
|
|
this.img_avatar.getComponent(Sprite).spriteFrame = d.sf
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- protected close(): void {
|
|
|
- this.node.active = false
|
|
|
- }
|
|
|
-
|
|
|
private requestSetAvatar() {
|
|
|
+ this.m_true_cb && this.m_true_cb()
|
|
|
this.close()
|
|
|
}
|
|
|
}
|