补充UI适配细节

This commit is contained in:
2025-06-03 20:33:58 +08:00
parent b1a3d44bdb
commit 22dcb86c69
6 changed files with 27 additions and 15 deletions

View File

@@ -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
})
}

View File

@@ -42,6 +42,9 @@ export class TrophyUnit extends Laya.Script {
if (find) {
UIManager.getInstance().loadTrophyShowUI(find)
}
else {
UIManager.getInstance().loadDCWtihMonth(info.year, info.month)
}
})
}
}