补充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

@@ -385,11 +385,11 @@
"_$id": "pezhhu4s", "_$id": "pezhhu4s",
"_$type": "Box", "_$type": "Box",
"name": "btn_new", "name": "btn_new",
"y": 366, "y": 510,
"width": 540, "width": 540,
"height": 156, "height": 156,
"visible": false, "visible": false,
"top": 366, "top": 510,
"centerX": 0, "centerX": 0,
"_$comp": [ "_$comp": [
{ {
@@ -506,10 +506,10 @@
"_$id": "txe3oxe8", "_$id": "txe3oxe8",
"_$type": "Box", "_$type": "Box",
"name": "btn_continue", "name": "btn_continue",
"y": 366, "y": 510,
"width": 540, "width": 540,
"height": 156, "height": 156,
"top": 366, "top": 510,
"centerX": 0, "centerX": 0,
"_$comp": [ "_$comp": [
{ {

View File

@@ -388,10 +388,10 @@
"_$id": "hgpxx02g", "_$id": "hgpxx02g",
"_$type": "Box", "_$type": "Box",
"name": "btn_new", "name": "btn_new",
"y": 366, "y": 510,
"width": 540, "width": 540,
"height": 156, "height": 156,
"top": 366, "top": 510,
"centerX": 0, "centerX": 0,
"_$comp": [ "_$comp": [
{ {
@@ -447,11 +447,11 @@
"_$id": "it1c7c3x", "_$id": "it1c7c3x",
"_$type": "Box", "_$type": "Box",
"name": "btn_home", "name": "btn_home",
"y": 558, "y": 510,
"width": 540, "width": 540,
"height": 156, "height": 156,
"visible": false, "visible": false,
"top": 558, "top": 510,
"centerX": 0, "centerX": 0,
"_$comp": [ "_$comp": [
{ {

View File

@@ -44571,7 +44571,7 @@
"_$id": "9t9m3cg3", "_$id": "9t9m3cg3",
"_$type": "Sprite", "_$type": "Sprite",
"name": "normal", "name": "normal",
"x": 34, "x": 40,
"y": -26, "y": -26,
"width": 48, "width": 48,
"height": 48, "height": 48,
@@ -44610,7 +44610,7 @@
"_$id": "jgwq47et", "_$id": "jgwq47et",
"_$type": "Sprite", "_$type": "Sprite",
"name": "ad", "name": "ad",
"x": 34, "x": 40,
"y": -26, "y": -26,
"width": 96, "width": 96,
"height": 48, "height": 48,

View File

@@ -7081,8 +7081,8 @@
"x": 64, "x": 64,
"y": 644, "y": 644,
"width": 1072, "width": 1072,
"height": 244, "height": 268,
"bottom": 72, "bottom": 48,
"centerX": 0, "centerX": 0,
"_$child": [ "_$child": [
{ {
@@ -7090,7 +7090,7 @@
"_$type": "Sprite", "_$type": "Sprite",
"name": "Sprite", "name": "Sprite",
"width": 1072, "width": 1072,
"height": 244, "height": 268,
"_gcmds": [ "_gcmds": [
{ {
"_$type": "DrawRoundRectCmd", "_$type": "DrawRoundRectCmd",
@@ -7271,8 +7271,8 @@
"y": 96, "y": 96,
"width": 720, "width": 720,
"height": 120, "height": 120,
"visible": false, "visible": true,
"top": 96, "top": 106,
"centerX": 0, "centerX": 0,
"_$comp": [ "_$comp": [
{ {

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 { public closeDCUI(): void {
if (this.dc_ui) { if (this.dc_ui) {
this.dc_ui.owner.destroy() this.dc_ui.owner.destroy()
@@ -151,10 +158,12 @@ export class UIManager extends Laya.Script {
} }
public loadTrophyShowUI(record: TrophyRecord): void { public loadTrophyShowUI(record: TrophyRecord): void {
this.mask.visible = true
Laya.loader.load(respath.trophy_show_ui_res()).then((go) => { Laya.loader.load(respath.trophy_show_ui_res()).then((go) => {
const prefab = go.create() const prefab = go.create()
const obj = this.getUIRoot().addChild(prefab).getComponent(TrophyShow) const obj = this.getUIRoot().addChild(prefab).getComponent(TrophyShow)
obj.onSetShow(record) obj.onSetShow(record)
this.mask.visible = false
}) })
} }

View File

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