feat: 更新关卡预览项的提示文本格式,添加新的遮罩图像和按钮图像

This commit is contained in:
richarjiang
2026-05-06 19:40:28 +08:00
parent 32adc7c467
commit 06238f933b
7 changed files with 173 additions and 39 deletions

View File

@@ -173,7 +173,7 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "d532045e-55f8-47c2-9493-b918e18364b0@f9941",
"__uuid__": "e9f94fb0-2acf-4004-8c6e-023e9deeb9cb@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,

View File

@@ -568,7 +568,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"y": 0.222,
"z": 0
},
"_lrot": {
@@ -607,7 +607,7 @@
"__id__": 24
}
],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 30
@@ -805,7 +805,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 12,
"height": 1650
"height": 1500
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -1078,7 +1078,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 960,
"height": 1650
"height": 1500
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -1241,7 +1241,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 960,
"height": 1650
"height": 1500
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -1541,8 +1541,8 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 38.01800000000003,
"y": 65.90200000000004,
"x": 52.989,
"y": 65.902,
"z": 0
},
"_lrot": {
@@ -1591,7 +1591,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 60.834,
"x": 173.707,
"y": 16.807,
"z": 0
},
@@ -1632,7 +1632,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 85.01953125,
"width": 300,
"height": 50.4
},
"_anchorPoint": {
@@ -1668,14 +1668,14 @@
"b": 54,
"a": 255
},
"_string": "提示 1",
"_horizontalAlign": 1,
"_string": "提示 1121212",
"_horizontalAlign": 0,
"_verticalAlign": 1,
"_actualFontSize": 30,
"_fontSize": 30,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_overflow": 0,
"_overflow": 1,
"_enableWrapText": false,
"_font": null,
"_isSystemFontUsed": true,
@@ -1931,8 +1931,8 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 38.01800000000003,
"y": -6.817999999999984,
"x": 52.989,
"y": -6.818,
"z": 0
},
"_lrot": {
@@ -1981,7 +1981,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 60.834,
"x": 173.707,
"y": 16.807,
"z": 0
},
@@ -2022,7 +2022,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 85.01953125,
"width": 300,
"height": 50.4
},
"_anchorPoint": {
@@ -2059,13 +2059,13 @@
"a": 255
},
"_string": "提示 2",
"_horizontalAlign": 1,
"_horizontalAlign": 0,
"_verticalAlign": 1,
"_actualFontSize": 30,
"_fontSize": 30,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_overflow": 0,
"_overflow": 1,
"_enableWrapText": false,
"_font": null,
"_isSystemFontUsed": true,
@@ -2321,7 +2321,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 27.53,
"x": 42.501,
"y": -67.231,
"z": 0
},
@@ -2507,7 +2507,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 74.813,
"x": 184.55,
"y": -2.119,
"z": 0
},
@@ -2548,7 +2548,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 70,
"width": 300,
"height": 50.4
},
"_anchorPoint": {
@@ -2585,13 +2585,13 @@
"a": 255
},
"_string": "答案",
"_horizontalAlign": 1,
"_horizontalAlign": 0,
"_verticalAlign": 1,
"_actualFontSize": 35,
"_fontSize": 35,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_overflow": 0,
"_overflow": 1,
"_enableWrapText": false,
"_font": {
"__uuid__": "fb4acba6-6bc7-4eb3-be34-8f2ac9823a80",

View File

@@ -34,9 +34,9 @@ export class PreviewLevelItem extends Component {
hint3: string;
}): void {
if (this.answerLabel) this.answerLabel.string = `答案:${opts.answer}`;
if (this.tips1Label) this.tips1Label.string = `线索一:${opts.hint1}`;
if (this.tips2Label) this.tips2Label.string = `线索二:${opts.hint2}`;
if (this.tips3Label) this.tips3Label.string = `线索三:${opts.hint3}`;
if (this.tips1Label) this.tips1Label.string = opts.hint1;
if (this.tips2Label) this.tips2Label.string = opts.hint2;
if (this.tips3Label) this.tips3Label.string = opts.hint3;
}
setCover(spriteFrame: SpriteFrame | null): void {

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "faab3d46-e885-4c46-8f19-9f872e7d6973",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "faab3d46-e885-4c46-8f19-9f872e7d6973@6c48a",
"displayName": "ScrolViewMask",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "faab3d46-e885-4c46-8f19-9f872e7d6973",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "faab3d46-e885-4c46-8f19-9f872e7d6973@f9941",
"displayName": "ScrolViewMask",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0.5,
"trimX": 0,
"trimY": 0,
"width": 1,
"height": 31,
"rawWidth": 1,
"rawHeight": 32,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-0.5,
-15.5,
0,
0.5,
-15.5,
0,
-0.5,
15.5,
0,
0.5,
15.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
32,
1,
32,
0,
1,
1,
1
],
"nuv": [
0,
0.03125,
1,
0.03125,
0,
1,
1,
1
],
"minPos": [
-0.5,
-15.5,
0
],
"maxPos": [
0.5,
15.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "faab3d46-e885-4c46-8f19-9f872e7d6973@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "faab3d46-e885-4c46-8f19-9f872e7d6973@6c48a"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 112 KiB

View File

@@ -41,11 +41,11 @@
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": -0.5,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 665,
"width": 666,
"height": 235,
"rawWidth": 666,
"rawHeight": 235,
@@ -60,16 +60,16 @@
"meshType": 0,
"vertices": {
"rawPosition": [
-332.5,
-333,
-117.5,
0,
332.5,
333,
-117.5,
0,
-332.5,
-333,
117.5,
0,
332.5,
333,
117.5,
0
],
@@ -84,30 +84,30 @@
"uv": [
0,
235,
665,
666,
235,
0,
0,
665,
666,
0
],
"nuv": [
0,
0,
0.9984984984984985,
1,
0,
0,
1,
0.9984984984984985,
1,
1
],
"minPos": [
-332.5,
-333,
-117.5,
0
],
"maxPos": [
332.5,
333,
117.5,
0
]