补充UI适配细节
This commit is contained in:
@@ -119,6 +119,13 @@ export class UIManager extends Laya.Script {
|
||||
})
|
||||
}
|
||||
|
||||
public loadDCWtihMonth(year: number, month: number): void {
|
||||
this.closeTrophyUI()
|
||||
if (this.dc_ui) {
|
||||
this.dc_ui.loadWithMonth(year, month)
|
||||
}
|
||||
}
|
||||
|
||||
public closeDCUI(): void {
|
||||
if (this.dc_ui) {
|
||||
this.dc_ui.owner.destroy()
|
||||
@@ -151,10 +158,12 @@ export class UIManager extends Laya.Script {
|
||||
}
|
||||
|
||||
public loadTrophyShowUI(record: TrophyRecord): void {
|
||||
this.mask.visible = true
|
||||
Laya.loader.load(respath.trophy_show_ui_res()).then((go) => {
|
||||
const prefab = go.create()
|
||||
const obj = this.getUIRoot().addChild(prefab).getComponent(TrophyShow)
|
||||
obj.onSetShow(record)
|
||||
this.mask.visible = false
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -42,6 +42,9 @@ export class TrophyUnit extends Laya.Script {
|
||||
if (find) {
|
||||
UIManager.getInstance().loadTrophyShowUI(find)
|
||||
}
|
||||
else {
|
||||
UIManager.getInstance().loadDCWtihMonth(info.year, info.month)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user