From d3523311510e06ef63e6f52f52dd6927b59c4da3 Mon Sep 17 00:00:00 2001 From: yangwen Date: Wed, 4 Jun 2025 18:06:27 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=A7=E7=BB=AD=E8=A1=A5=E5=85=85UI=E7=BB=86?= =?UTF-8?q?=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/resources/Difficulty.lh | 761 ++++++++++++------------ assets/resources/dc/TrophyRoomCell.lh | 48 +- assets/resources/dc/TrophyRoomCell_H.lh | 92 +-- src/views/Difficulty.ts | 5 +- 4 files changed, 459 insertions(+), 447 deletions(-) diff --git a/assets/resources/Difficulty.lh b/assets/resources/Difficulty.lh index 45bd114..046db5d 100644 --- a/assets/resources/Difficulty.lh +++ b/assets/resources/Difficulty.lh @@ -14,7 +14,6 @@ { "_$type": "87bad4d3-bede-442e-914d-d7bcdc85f0d1", "scriptPath": "../src/views/Difficulty.ts", - "sprite_bg": null, "obj_items": { "_$ref": "34t1dkio" } @@ -36,430 +35,442 @@ "color": "#000000" }, { - "_$id": "jzxgx41i", + "_$id": "8qh18emh", "_$type": "Box", - "name": "offset", - "y": 2400, + "name": "bottom", + "y": 705, "width": 1080, "height": 1215, - "_mouseState": 2, "left": 0, "right": 0, - "bottom": -1695, + "bottom": 0, "_$child": [ { - "_$id": "bd1s5tvm", - "_$type": "Sprite", - "name": "bg", + "_$id": "jzxgx41i", + "_$type": "Box", + "name": "offset", "width": 1080, "height": 1215, - "_gcmds": [ - { - "_$type": "DrawRoundRectCmd", - "x": 0, - "y": 0, - "width": 1, - "height": 1, - "lt": 48, - "rt": 48, - "lb": 0, - "rb": 0, - "percent": true, - "lineWidth": 1, - "fillColor": "rgba(245, 247, 251, 1)" - } - ] - }, - { - "_$id": "e5l16p86", - "_$type": "Label", - "name": "Label", - "x": 90, - "y": 35, - "width": 900, - "height": 180, - "centerX": 0, - "text": "New Game", - "font": "res://7322bbf9-175b-4a25-a0d7-72d369894de2", - "fontSize": 72, - "color": "rgba(45, 49, 56, 1)", - "bold": true, - "align": "center", - "valign": "middle", - "padding": "0,0,0,0", - "_$child": [ - { - "_$id": "5xwrtg57", - "_$type": "Box", - "name": "Box", - "x": 410, - "y": -20, - "width": 80, - "height": 20, - "centerX": 0, - "centerY": -100, - "_$child": [ - { - "_$id": "wk9lt59j", - "_$type": "Sprite", - "name": "Sprite", - "width": 80, - "height": 12, - "_gcmds": [ - { - "_$type": "DrawRoundRectCmd", - "x": 0, - "y": 0, - "width": 1, - "height": 1, - "lt": 6, - "rt": 6, - "lb": 6, - "rb": 6, - "percent": true, - "lineWidth": 1, - "fillColor": "rgba(211, 213, 219, 1)" - } - ] - } - ] - } - ] - }, - { - "_$id": "34t1dkio", - "_$type": "VBox", - "name": "items", - "y": 288, - "width": 1080, - "height": 840, "_mouseState": 2, - "bottom": 87, - "centerX": 0, - "space": 30, - "align": "center", + "left": 0, + "right": 0, + "bottom": 0, "_$child": [ { - "_$id": "rxv162yy", - "_$type": "Box", - "name": "Box(1)", - "x": 72, - "width": 936, - "height": 144, - "_$comp": [ + "_$id": "bd1s5tvm", + "_$type": "Sprite", + "name": "bg", + "width": 1080, + "height": 1215, + "_gcmds": [ { - "_$type": "8857686b-9b2c-4e9c-af0f-0164c0994e46", - "scriptPath": "../src/views/common/CommonData.ts", - "intValue": 0, - "strValue": "" - }, - { - "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", - "scriptPath": "../src/views/common/CommonHover.ts", - "hoverAlpha": true - } - ], - "_$child": [ - { - "_$id": "590euu2q", - "_$type": "Sprite", - "name": "Sprite", - "width": 936, - "height": 144, - "mouseThrough": true, - "_gcmds": [ - { - "_$type": "DrawRoundRectCmd", - "x": 0, - "y": 0, - "width": 1, - "height": 1, - "lt": 36, - "rt": 36, - "lb": 36, - "rb": 36, - "percent": true, - "lineWidth": 1, - "fillColor": "#FFFFFF" - } - ] - }, - { - "_$id": "36r7vd4n", - "_$type": "Label", - "name": "Label", - "width": 900, - "height": 144, - "centerX": -18, - "centerY": 0, - "text": "Easy", - "font": "res://7322bbf9-175b-4a25-a0d7-72d369894de2", - "fontSize": 54, - "color": "rgba(45, 49, 56, 1)", - "bold": true, - "align": "center", - "valign": "middle", - "padding": "0,0,0,0" + "_$type": "DrawRoundRectCmd", + "x": 0, + "y": 0, + "width": 1, + "height": 1, + "lt": 48, + "rt": 48, + "lb": 0, + "rb": 0, + "percent": true, + "lineWidth": 1, + "fillColor": "rgba(245, 247, 251, 1)" } ] }, { - "_$id": "0q6t2588", - "_$type": "Box", - "name": "Box(2)", - "x": 72, - "y": 174, - "width": 936, - "height": 144, - "_$comp": [ - { - "_$type": "8857686b-9b2c-4e9c-af0f-0164c0994e46", - "scriptPath": "../src/views/common/CommonData.ts", - "intValue": 0, - "strValue": "" - }, - { - "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", - "scriptPath": "../src/views/common/CommonHover.ts", - "hoverAlpha": true - } - ], + "_$id": "e5l16p86", + "_$type": "Label", + "name": "Label", + "x": 90, + "y": 35, + "width": 900, + "height": 180, + "centerX": 0, + "text": "New Game", + "font": "res://7322bbf9-175b-4a25-a0d7-72d369894de2", + "fontSize": 72, + "color": "rgba(45, 49, 56, 1)", + "bold": true, + "align": "center", + "valign": "middle", + "padding": "0,0,0,0", "_$child": [ { - "_$id": "yjk1xq2a", - "_$type": "Sprite", - "name": "Sprite", - "width": 936, - "height": 144, - "mouseThrough": true, - "_gcmds": [ + "_$id": "5xwrtg57", + "_$type": "Box", + "name": "Box", + "x": 410, + "y": -20, + "width": 80, + "height": 20, + "centerX": 0, + "centerY": -100, + "_$child": [ { - "_$type": "DrawRoundRectCmd", - "x": 0, - "y": 0, - "width": 1, - "height": 1, - "lt": 36, - "rt": 36, - "lb": 36, - "rb": 36, - "percent": true, - "lineWidth": 1, - "fillColor": "#FFFFFF" + "_$id": "wk9lt59j", + "_$type": "Sprite", + "name": "Sprite", + "width": 80, + "height": 12, + "_gcmds": [ + { + "_$type": "DrawRoundRectCmd", + "x": 0, + "y": 0, + "width": 1, + "height": 1, + "lt": 6, + "rt": 6, + "lb": 6, + "rb": 6, + "percent": true, + "lineWidth": 1, + "fillColor": "rgba(211, 213, 219, 1)" + } + ] } ] - }, - { - "_$id": "ctexrl7w", - "_$type": "Label", - "name": "Label", - "width": 900, - "height": 144, - "centerX": -18, - "centerY": 0, - "text": "Medium", - "font": "res://7322bbf9-175b-4a25-a0d7-72d369894de2", - "fontSize": 54, - "color": "rgba(45, 49, 56, 1)", - "bold": true, - "align": "center", - "valign": "middle", - "padding": "0,0,0,0" } ] }, { - "_$id": "j3ml4g8s", - "_$type": "Box", - "name": "Box(3)", - "x": 72, - "y": 348, - "width": 936, - "height": 144, - "_$comp": [ - { - "_$type": "8857686b-9b2c-4e9c-af0f-0164c0994e46", - "scriptPath": "../src/views/common/CommonData.ts", - "intValue": 0, - "strValue": "" - }, - { - "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", - "scriptPath": "../src/views/common/CommonHover.ts", - "hoverAlpha": true - } - ], + "_$id": "34t1dkio", + "_$type": "VBox", + "name": "items", + "y": 288, + "width": 1080, + "height": 840, + "_mouseState": 2, + "bottom": 87, + "centerX": 0, + "space": 30, + "align": "center", "_$child": [ { - "_$id": "nfk6pjgd", - "_$type": "Sprite", - "name": "Sprite", + "_$id": "rxv162yy", + "_$type": "Box", + "name": "Box(1)", + "x": 72, "width": 936, "height": 144, - "mouseThrough": true, - "_gcmds": [ + "_$comp": [ { - "_$type": "DrawRoundRectCmd", - "x": 0, - "y": 0, - "width": 1, - "height": 1, - "lt": 36, - "rt": 36, - "lb": 36, - "rb": 36, - "percent": true, - "lineWidth": 1, - "fillColor": "#FFFFFF" + "_$type": "8857686b-9b2c-4e9c-af0f-0164c0994e46", + "scriptPath": "../src/views/common/CommonData.ts", + "intValue": 0, + "strValue": "" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts", + "hoverAlpha": true + } + ], + "_$child": [ + { + "_$id": "590euu2q", + "_$type": "Sprite", + "name": "Sprite", + "width": 936, + "height": 144, + "mouseThrough": true, + "_gcmds": [ + { + "_$type": "DrawRoundRectCmd", + "x": 0, + "y": 0, + "width": 1, + "height": 1, + "lt": 36, + "rt": 36, + "lb": 36, + "rb": 36, + "percent": true, + "lineWidth": 1, + "fillColor": "#FFFFFF" + } + ] + }, + { + "_$id": "36r7vd4n", + "_$type": "Label", + "name": "Label", + "width": 900, + "height": 144, + "centerX": -18, + "centerY": 0, + "text": "Easy", + "font": "res://7322bbf9-175b-4a25-a0d7-72d369894de2", + "fontSize": 54, + "color": "rgba(45, 49, 56, 1)", + "bold": true, + "align": "center", + "valign": "middle", + "padding": "0,0,0,0" } ] }, { - "_$id": "yk78vemi", - "_$type": "Label", - "name": "Label", - "width": 900, - "height": 144, - "centerX": -18, - "centerY": 0, - "text": "Hard", - "font": "res://7322bbf9-175b-4a25-a0d7-72d369894de2", - "fontSize": 54, - "color": "rgba(45, 49, 56, 1)", - "bold": true, - "align": "center", - "valign": "middle", - "padding": "0,0,0,0" - } - ] - }, - { - "_$id": "e4epdrmw", - "_$type": "Box", - "name": "Box(4)", - "x": 72, - "y": 522, - "width": 936, - "height": 144, - "_$comp": [ - { - "_$type": "8857686b-9b2c-4e9c-af0f-0164c0994e46", - "scriptPath": "../src/views/common/CommonData.ts", - "intValue": 0, - "strValue": "" - }, - { - "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", - "scriptPath": "../src/views/common/CommonHover.ts", - "hoverAlpha": true - } - ], - "_$child": [ - { - "_$id": "nogfpbyx", - "_$type": "Sprite", - "name": "Sprite", + "_$id": "0q6t2588", + "_$type": "Box", + "name": "Box(2)", + "x": 72, + "y": 174, "width": 936, "height": 144, - "mouseThrough": true, - "_gcmds": [ + "_$comp": [ { - "_$type": "DrawRoundRectCmd", - "x": 0, - "y": 0, - "width": 1, - "height": 1, - "lt": 36, - "rt": 36, - "lb": 36, - "rb": 36, - "percent": true, - "lineWidth": 1, - "fillColor": "#FFFFFF" + "_$type": "8857686b-9b2c-4e9c-af0f-0164c0994e46", + "scriptPath": "../src/views/common/CommonData.ts", + "intValue": 0, + "strValue": "" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts", + "hoverAlpha": true + } + ], + "_$child": [ + { + "_$id": "yjk1xq2a", + "_$type": "Sprite", + "name": "Sprite", + "width": 936, + "height": 144, + "mouseThrough": true, + "_gcmds": [ + { + "_$type": "DrawRoundRectCmd", + "x": 0, + "y": 0, + "width": 1, + "height": 1, + "lt": 36, + "rt": 36, + "lb": 36, + "rb": 36, + "percent": true, + "lineWidth": 1, + "fillColor": "#FFFFFF" + } + ] + }, + { + "_$id": "ctexrl7w", + "_$type": "Label", + "name": "Label", + "width": 900, + "height": 144, + "centerX": -18, + "centerY": 0, + "text": "Medium", + "font": "res://7322bbf9-175b-4a25-a0d7-72d369894de2", + "fontSize": 54, + "color": "rgba(45, 49, 56, 1)", + "bold": true, + "align": "center", + "valign": "middle", + "padding": "0,0,0,0" } ] }, { - "_$id": "83aiwvdd", - "_$type": "Label", - "name": "Label", - "width": 900, - "height": 144, - "centerX": -18, - "centerY": 0, - "text": "Expert", - "font": "res://7322bbf9-175b-4a25-a0d7-72d369894de2", - "fontSize": 54, - "color": "rgba(45, 49, 56, 1)", - "bold": true, - "align": "center", - "valign": "middle", - "padding": "0,0,0,0" - } - ] - }, - { - "_$id": "a2kjyumo", - "_$type": "Box", - "name": "Box(5)", - "x": 72, - "y": 696, - "width": 936, - "height": 144, - "_$comp": [ - { - "_$type": "8857686b-9b2c-4e9c-af0f-0164c0994e46", - "scriptPath": "../src/views/common/CommonData.ts", - "intValue": 0, - "strValue": "" - }, - { - "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", - "scriptPath": "../src/views/common/CommonHover.ts", - "hoverAlpha": true - } - ], - "_$child": [ - { - "_$id": "2unm1bxx", - "_$type": "Sprite", - "name": "Sprite", + "_$id": "j3ml4g8s", + "_$type": "Box", + "name": "Box(3)", + "x": 72, + "y": 348, "width": 936, "height": 144, - "mouseThrough": true, - "_gcmds": [ + "_$comp": [ { - "_$type": "DrawRoundRectCmd", - "x": 0, - "y": 0, - "width": 1, - "height": 1, - "lt": 36, - "rt": 36, - "lb": 36, - "rb": 36, - "percent": true, - "lineWidth": 1, - "fillColor": "#FFFFFF" + "_$type": "8857686b-9b2c-4e9c-af0f-0164c0994e46", + "scriptPath": "../src/views/common/CommonData.ts", + "intValue": 0, + "strValue": "" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts", + "hoverAlpha": true + } + ], + "_$child": [ + { + "_$id": "nfk6pjgd", + "_$type": "Sprite", + "name": "Sprite", + "width": 936, + "height": 144, + "mouseThrough": true, + "_gcmds": [ + { + "_$type": "DrawRoundRectCmd", + "x": 0, + "y": 0, + "width": 1, + "height": 1, + "lt": 36, + "rt": 36, + "lb": 36, + "rb": 36, + "percent": true, + "lineWidth": 1, + "fillColor": "#FFFFFF" + } + ] + }, + { + "_$id": "yk78vemi", + "_$type": "Label", + "name": "Label", + "width": 900, + "height": 144, + "centerX": -18, + "centerY": 0, + "text": "Hard", + "font": "res://7322bbf9-175b-4a25-a0d7-72d369894de2", + "fontSize": 54, + "color": "rgba(45, 49, 56, 1)", + "bold": true, + "align": "center", + "valign": "middle", + "padding": "0,0,0,0" } ] }, { - "_$id": "p36e2q6t", - "_$type": "Label", - "name": "Label", - "width": 900, + "_$id": "e4epdrmw", + "_$type": "Box", + "name": "Box(4)", + "x": 72, + "y": 522, + "width": 936, "height": 144, - "centerX": -18, - "centerY": 0, - "text": "Extreme", - "font": "res://7322bbf9-175b-4a25-a0d7-72d369894de2", - "fontSize": 54, - "color": "rgba(45, 49, 56, 1)", - "bold": true, - "align": "center", - "valign": "middle", - "padding": "0,0,0,0" + "_$comp": [ + { + "_$type": "8857686b-9b2c-4e9c-af0f-0164c0994e46", + "scriptPath": "../src/views/common/CommonData.ts", + "intValue": 0, + "strValue": "" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts", + "hoverAlpha": true + } + ], + "_$child": [ + { + "_$id": "nogfpbyx", + "_$type": "Sprite", + "name": "Sprite", + "width": 936, + "height": 144, + "mouseThrough": true, + "_gcmds": [ + { + "_$type": "DrawRoundRectCmd", + "x": 0, + "y": 0, + "width": 1, + "height": 1, + "lt": 36, + "rt": 36, + "lb": 36, + "rb": 36, + "percent": true, + "lineWidth": 1, + "fillColor": "#FFFFFF" + } + ] + }, + { + "_$id": "83aiwvdd", + "_$type": "Label", + "name": "Label", + "width": 900, + "height": 144, + "centerX": -18, + "centerY": 0, + "text": "Expert", + "font": "res://7322bbf9-175b-4a25-a0d7-72d369894de2", + "fontSize": 54, + "color": "rgba(45, 49, 56, 1)", + "bold": true, + "align": "center", + "valign": "middle", + "padding": "0,0,0,0" + } + ] + }, + { + "_$id": "a2kjyumo", + "_$type": "Box", + "name": "Box(5)", + "x": 72, + "y": 696, + "width": 936, + "height": 144, + "_$comp": [ + { + "_$type": "8857686b-9b2c-4e9c-af0f-0164c0994e46", + "scriptPath": "../src/views/common/CommonData.ts", + "intValue": 0, + "strValue": "" + }, + { + "_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", + "scriptPath": "../src/views/common/CommonHover.ts", + "hoverAlpha": true + } + ], + "_$child": [ + { + "_$id": "2unm1bxx", + "_$type": "Sprite", + "name": "Sprite", + "width": 936, + "height": 144, + "mouseThrough": true, + "_gcmds": [ + { + "_$type": "DrawRoundRectCmd", + "x": 0, + "y": 0, + "width": 1, + "height": 1, + "lt": 36, + "rt": 36, + "lb": 36, + "rb": 36, + "percent": true, + "lineWidth": 1, + "fillColor": "#FFFFFF" + } + ] + }, + { + "_$id": "p36e2q6t", + "_$type": "Label", + "name": "Label", + "width": 900, + "height": 144, + "centerX": -18, + "centerY": 0, + "text": "Extreme", + "font": "res://7322bbf9-175b-4a25-a0d7-72d369894de2", + "fontSize": 54, + "color": "rgba(45, 49, 56, 1)", + "bold": true, + "align": "center", + "valign": "middle", + "padding": "0,0,0,0" + } + ] } ] } diff --git a/assets/resources/dc/TrophyRoomCell.lh b/assets/resources/dc/TrophyRoomCell.lh index 17757f9..4c0f3dd 100644 --- a/assets/resources/dc/TrophyRoomCell.lh +++ b/assets/resources/dc/TrophyRoomCell.lh @@ -87,9 +87,8 @@ "_$id": "5wwqja5x", "_$type": "Label", "name": "label_month", - "x": 114, "y": 334, - "width": 100, + "width": 328, "height": 60, "bottom": -106, "centerX": 0, @@ -97,13 +96,14 @@ "font": "res://7322bbf9-175b-4a25-a0d7-72d369894de2", "fontSize": 42, "color": "rgba(167, 171, 179, 1)", + "align": "center", "valign": "middle", "padding": "0,0,0,0" } ] }, { - "_$id": "u3azxf82", + "_$id": "sdxgsg64", "_$type": "Box", "name": "Box(2)", "x": 328, @@ -114,22 +114,22 @@ "_$type": "79064920-30a6-4b11-a82e-bbdd4112c4e1", "scriptPath": "../src/views/dc/TrophyUnit.ts", "bg_light": { - "_$ref": "tnjynmgf" + "_$ref": "cmcgnmju" }, "icon": { - "_$ref": "0qe74n99" + "_$ref": "iv946bfq" }, "label_count": { - "_$ref": "9dsn53bb" + "_$ref": "8zok6mg3" }, "label_month": { - "_$ref": "zse8y0wo" + "_$ref": "m7q5zv5i" } } ], "_$child": [ { - "_$id": "tnjynmgf", + "_$id": "cmcgnmju", "_$type": "Image", "name": "bg_light", "x": 20, @@ -140,7 +140,7 @@ "color": "#ffffff" }, { - "_$id": "0qe74n99", + "_$id": "iv946bfq", "_$type": "Image", "name": "icon", "x": 20, @@ -151,7 +151,7 @@ "color": "#ffffff" }, { - "_$id": "9dsn53bb", + "_$id": "8zok6mg3", "_$type": "Label", "name": "label_count", "x": 128, @@ -169,12 +169,11 @@ "padding": "0,0,0,0" }, { - "_$id": "zse8y0wo", + "_$id": "m7q5zv5i", "_$type": "Label", "name": "label_month", - "x": 114, "y": 334, - "width": 100, + "width": 328, "height": 60, "bottom": -106, "centerX": 0, @@ -182,13 +181,14 @@ "font": "res://7322bbf9-175b-4a25-a0d7-72d369894de2", "fontSize": 42, "color": "rgba(167, 171, 179, 1)", + "align": "center", "valign": "middle", "padding": "0,0,0,0" } ] }, { - "_$id": "wle8hrmr", + "_$id": "tc7xviei", "_$type": "Box", "name": "Box(3)", "x": 656, @@ -199,22 +199,22 @@ "_$type": "79064920-30a6-4b11-a82e-bbdd4112c4e1", "scriptPath": "../src/views/dc/TrophyUnit.ts", "bg_light": { - "_$ref": "o57stpd9" + "_$ref": "k5b3mzbs" }, "icon": { - "_$ref": "en1ghf80" + "_$ref": "qi90ngqx" }, "label_count": { - "_$ref": "1znenn3j" + "_$ref": "1t6ofvi0" }, "label_month": { - "_$ref": "row347fk" + "_$ref": "bcvpzkxl" } } ], "_$child": [ { - "_$id": "o57stpd9", + "_$id": "k5b3mzbs", "_$type": "Image", "name": "bg_light", "x": 20, @@ -225,7 +225,7 @@ "color": "#ffffff" }, { - "_$id": "en1ghf80", + "_$id": "qi90ngqx", "_$type": "Image", "name": "icon", "x": 20, @@ -236,7 +236,7 @@ "color": "#ffffff" }, { - "_$id": "1znenn3j", + "_$id": "1t6ofvi0", "_$type": "Label", "name": "label_count", "x": 128, @@ -254,12 +254,11 @@ "padding": "0,0,0,0" }, { - "_$id": "row347fk", + "_$id": "bcvpzkxl", "_$type": "Label", "name": "label_month", - "x": 114, "y": 334, - "width": 100, + "width": 328, "height": 60, "bottom": -106, "centerX": 0, @@ -267,6 +266,7 @@ "font": "res://7322bbf9-175b-4a25-a0d7-72d369894de2", "fontSize": 42, "color": "rgba(167, 171, 179, 1)", + "align": "center", "valign": "middle", "padding": "0,0,0,0" } diff --git a/assets/resources/dc/TrophyRoomCell_H.lh b/assets/resources/dc/TrophyRoomCell_H.lh index 7ed740f..42febba 100644 --- a/assets/resources/dc/TrophyRoomCell_H.lh +++ b/assets/resources/dc/TrophyRoomCell_H.lh @@ -87,9 +87,8 @@ "_$id": "ybx61p0y", "_$type": "Label", "name": "label_month", - "x": 133, "y": 334, - "width": 100, + "width": 366, "height": 60, "bottom": -106, "centerX": 0, @@ -97,13 +96,14 @@ "font": "res://7322bbf9-175b-4a25-a0d7-72d369894de2", "fontSize": 42, "color": "rgba(167, 171, 179, 1)", + "align": "center", "valign": "middle", "padding": "0,0,0,0" } ] }, { - "_$id": "khaz9803", + "_$id": "8sqsb1v7", "_$type": "Box", "name": "Box(2)", "x": 366, @@ -114,22 +114,22 @@ "_$type": "79064920-30a6-4b11-a82e-bbdd4112c4e1", "scriptPath": "../src/views/dc/TrophyUnit.ts", "bg_light": { - "_$ref": "wswxra73" + "_$ref": "mv6jx0hr" }, "icon": { - "_$ref": "3eszf2o1" + "_$ref": "zp0wq75q" }, "label_count": { - "_$ref": "saz64m1x" + "_$ref": "ywg1cix4" }, "label_month": { - "_$ref": "xzf561ib" + "_$ref": "1pcxh1ei" } } ], "_$child": [ { - "_$id": "wswxra73", + "_$id": "mv6jx0hr", "_$type": "Image", "name": "bg_light", "x": 39, @@ -140,7 +140,7 @@ "color": "#ffffff" }, { - "_$id": "3eszf2o1", + "_$id": "zp0wq75q", "_$type": "Image", "name": "icon", "x": 39, @@ -151,7 +151,7 @@ "color": "#ffffff" }, { - "_$id": "saz64m1x", + "_$id": "ywg1cix4", "_$type": "Label", "name": "label_count", "x": 147, @@ -169,12 +169,11 @@ "padding": "0,0,0,0" }, { - "_$id": "xzf561ib", + "_$id": "1pcxh1ei", "_$type": "Label", "name": "label_month", - "x": 133, "y": 334, - "width": 100, + "width": 366, "height": 60, "bottom": -106, "centerX": 0, @@ -182,13 +181,14 @@ "font": "res://7322bbf9-175b-4a25-a0d7-72d369894de2", "fontSize": 42, "color": "rgba(167, 171, 179, 1)", + "align": "center", "valign": "middle", "padding": "0,0,0,0" } ] }, { - "_$id": "be29eeum", + "_$id": "1xs6zjzu", "_$type": "Box", "name": "Box(3)", "x": 732, @@ -199,22 +199,22 @@ "_$type": "79064920-30a6-4b11-a82e-bbdd4112c4e1", "scriptPath": "../src/views/dc/TrophyUnit.ts", "bg_light": { - "_$ref": "un800knw" + "_$ref": "1po7r6cl" }, "icon": { - "_$ref": "hqax24bs" + "_$ref": "6ymckz7p" }, "label_count": { - "_$ref": "qxr4wb3w" + "_$ref": "mq8s6wlg" }, "label_month": { - "_$ref": "y5wo3jiq" + "_$ref": "cbj7anbs" } } ], "_$child": [ { - "_$id": "un800knw", + "_$id": "1po7r6cl", "_$type": "Image", "name": "bg_light", "x": 39, @@ -225,7 +225,7 @@ "color": "#ffffff" }, { - "_$id": "hqax24bs", + "_$id": "6ymckz7p", "_$type": "Image", "name": "icon", "x": 39, @@ -236,7 +236,7 @@ "color": "#ffffff" }, { - "_$id": "qxr4wb3w", + "_$id": "mq8s6wlg", "_$type": "Label", "name": "label_count", "x": 147, @@ -254,12 +254,11 @@ "padding": "0,0,0,0" }, { - "_$id": "y5wo3jiq", + "_$id": "cbj7anbs", "_$type": "Label", "name": "label_month", - "x": 133, "y": 334, - "width": 100, + "width": 366, "height": 60, "bottom": -106, "centerX": 0, @@ -267,13 +266,14 @@ "font": "res://7322bbf9-175b-4a25-a0d7-72d369894de2", "fontSize": 42, "color": "rgba(167, 171, 179, 1)", + "align": "center", "valign": "middle", "padding": "0,0,0,0" } ] }, { - "_$id": "l1qfa1q3", + "_$id": "9h2i3y7o", "_$type": "Box", "name": "Box(4)", "x": 1098, @@ -284,22 +284,22 @@ "_$type": "79064920-30a6-4b11-a82e-bbdd4112c4e1", "scriptPath": "../src/views/dc/TrophyUnit.ts", "bg_light": { - "_$ref": "5gsoayj9" + "_$ref": "8fygsnwf" }, "icon": { - "_$ref": "54xz5s5e" + "_$ref": "b6j6afm0" }, "label_count": { - "_$ref": "6q0dsx4g" + "_$ref": "8nqk46k9" }, "label_month": { - "_$ref": "sj7l0rt1" + "_$ref": "bbay5ca1" } } ], "_$child": [ { - "_$id": "5gsoayj9", + "_$id": "8fygsnwf", "_$type": "Image", "name": "bg_light", "x": 39, @@ -310,7 +310,7 @@ "color": "#ffffff" }, { - "_$id": "54xz5s5e", + "_$id": "b6j6afm0", "_$type": "Image", "name": "icon", "x": 39, @@ -321,7 +321,7 @@ "color": "#ffffff" }, { - "_$id": "6q0dsx4g", + "_$id": "8nqk46k9", "_$type": "Label", "name": "label_count", "x": 147, @@ -339,12 +339,11 @@ "padding": "0,0,0,0" }, { - "_$id": "sj7l0rt1", + "_$id": "bbay5ca1", "_$type": "Label", "name": "label_month", - "x": 133, "y": 334, - "width": 100, + "width": 366, "height": 60, "bottom": -106, "centerX": 0, @@ -352,13 +351,14 @@ "font": "res://7322bbf9-175b-4a25-a0d7-72d369894de2", "fontSize": 42, "color": "rgba(167, 171, 179, 1)", + "align": "center", "valign": "middle", "padding": "0,0,0,0" } ] }, { - "_$id": "m8pa8be4", + "_$id": "v4qo7s87", "_$type": "Box", "name": "Box(5)", "x": 1464, @@ -369,22 +369,22 @@ "_$type": "79064920-30a6-4b11-a82e-bbdd4112c4e1", "scriptPath": "../src/views/dc/TrophyUnit.ts", "bg_light": { - "_$ref": "gu5av5vw" + "_$ref": "aw2ku55f" }, "icon": { - "_$ref": "dkfotcdq" + "_$ref": "euqes0rh" }, "label_count": { - "_$ref": "z7hfr2ud" + "_$ref": "34ujh5mt" }, "label_month": { - "_$ref": "f0b5rsee" + "_$ref": "ywbyys1d" } } ], "_$child": [ { - "_$id": "gu5av5vw", + "_$id": "aw2ku55f", "_$type": "Image", "name": "bg_light", "x": 39, @@ -395,7 +395,7 @@ "color": "#ffffff" }, { - "_$id": "dkfotcdq", + "_$id": "euqes0rh", "_$type": "Image", "name": "icon", "x": 39, @@ -406,7 +406,7 @@ "color": "#ffffff" }, { - "_$id": "z7hfr2ud", + "_$id": "34ujh5mt", "_$type": "Label", "name": "label_count", "x": 147, @@ -424,12 +424,11 @@ "padding": "0,0,0,0" }, { - "_$id": "f0b5rsee", + "_$id": "ywbyys1d", "_$type": "Label", "name": "label_month", - "x": 133, "y": 334, - "width": 100, + "width": 366, "height": 60, "bottom": -106, "centerX": 0, @@ -437,6 +436,7 @@ "font": "res://7322bbf9-175b-4a25-a0d7-72d369894de2", "fontSize": 42, "color": "rgba(167, 171, 179, 1)", + "align": "center", "valign": "middle", "padding": "0,0,0,0" } diff --git a/src/views/Difficulty.ts b/src/views/Difficulty.ts index 9cfa46b..1d468e1 100644 --- a/src/views/Difficulty.ts +++ b/src/views/Difficulty.ts @@ -12,12 +12,13 @@ export class Difficulty extends Laya.Script { // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { - const offset = this.owner.getChildByName("offset") as Laya.Box + const offset = this.owner.getChildByName("bottom").getChildByName("offset") as Laya.Box const bg = offset.getChildByName("bg") as Laya.Sprite bg.graphics.clear() bg.graphics.drawRoundRect(0, 0, offset.width, offset.height, 20, 20, 0, 0, "#f5f7fb") - Laya.Tween.to(offset, { y: 705 }, 500) + offset.y = offset.width + Laya.Tween.to(offset, { y: 0 }, 500) const mask = this.owner.getChildByName("mask") mask.on(Laya.Event.CLICK, this, () => {