Commit 09310afe authored by limingzhe's avatar limingzhe

fix: 猴子压扁,unit改为1个按钮, 名称超过14个缩小字体

parent 8caa7f48
No preview for this file type
...@@ -78,10 +78,10 @@ ...@@ -78,10 +78,10 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 418 "__id__": 421
}, },
{ {
"__id__": 419 "__id__": 422
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -245,13 +245,13 @@ ...@@ -245,13 +245,13 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 415 "__id__": 418
}, },
{ {
"__id__": 416 "__id__": 419
}, },
{ {
"__id__": 417 "__id__": 420
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -317,13 +317,13 @@ ...@@ -317,13 +317,13 @@
"__id__": 405 "__id__": 405
}, },
{ {
"__id__": 409 "__id__": 412
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 414 "__id__": 417
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -933,7 +933,7 @@ ...@@ -933,7 +933,7 @@
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 208, "width": 208,
"height": 3850 "height": 3350
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -1552,7 +1552,7 @@ ...@@ -1552,7 +1552,7 @@
"__id__": 34 "__id__": 34
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 39 "__id__": 39
...@@ -1951,7 +1951,7 @@ ...@@ -1951,7 +1951,7 @@
"__id__": 44 "__id__": 44
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 49 "__id__": 49
...@@ -3588,7 +3588,7 @@ ...@@ -3588,7 +3588,7 @@
"__id__": 82 "__id__": 82
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 87 "__id__": 87
...@@ -3987,7 +3987,7 @@ ...@@ -3987,7 +3987,7 @@
"__id__": 92 "__id__": 92
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 97 "__id__": 97
...@@ -5623,7 +5623,7 @@ ...@@ -5623,7 +5623,7 @@
"__id__": 130 "__id__": 130
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 135 "__id__": 135
...@@ -6021,7 +6021,7 @@ ...@@ -6021,7 +6021,7 @@
"__id__": 140 "__id__": 140
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 145 "__id__": 145
...@@ -7656,7 +7656,7 @@ ...@@ -7656,7 +7656,7 @@
"__id__": 178 "__id__": 178
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 183 "__id__": 183
...@@ -8054,7 +8054,7 @@ ...@@ -8054,7 +8054,7 @@
"__id__": 188 "__id__": 188
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 193 "__id__": 193
...@@ -8523,7 +8523,7 @@ ...@@ -8523,7 +8523,7 @@
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 208, "width": 208,
"height": 3850 "height": 3350
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -9141,7 +9141,7 @@ ...@@ -9141,7 +9141,7 @@
"__id__": 214 "__id__": 214
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 219 "__id__": 219
...@@ -9539,7 +9539,7 @@ ...@@ -9539,7 +9539,7 @@
"__id__": 224 "__id__": 224
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 229 "__id__": 229
...@@ -11174,7 +11174,7 @@ ...@@ -11174,7 +11174,7 @@
"__id__": 262 "__id__": 262
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 267 "__id__": 267
...@@ -11572,7 +11572,7 @@ ...@@ -11572,7 +11572,7 @@
"__id__": 272 "__id__": 272
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 277 "__id__": 277
...@@ -13207,7 +13207,7 @@ ...@@ -13207,7 +13207,7 @@
"__id__": 310 "__id__": 310
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 315 "__id__": 315
...@@ -13605,7 +13605,7 @@ ...@@ -13605,7 +13605,7 @@
"__id__": 320 "__id__": 320
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 325 "__id__": 325
...@@ -15240,7 +15240,7 @@ ...@@ -15240,7 +15240,7 @@
"__id__": 358 "__id__": 358
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 363 "__id__": 363
...@@ -15638,7 +15638,7 @@ ...@@ -15638,7 +15638,7 @@
"__id__": 368 "__id__": 368
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 373 "__id__": 373
...@@ -17160,17 +17160,21 @@ ...@@ -17160,17 +17160,21 @@
"_parent": { "_parent": {
"__id__": 6 "__id__": 6
}, },
"_children": [], "_children": [
{
"__id__": 406
}
],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 406 "__id__": 409
}, },
{ {
"__id__": 407 "__id__": 410
}, },
{ {
"__id__": 408 "__id__": 411
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -17221,6 +17225,130 @@ ...@@ -17221,6 +17225,130 @@
"groupIndex": 0, "groupIndex": 0,
"_id": "72eQdHQzhLjaTTxjPRjIb+" "_id": "72eQdHQzhLjaTTxjPRjIb+"
}, },
{
"__type__": "cc.Node",
"_name": "bg_monkey_2",
"_objFlags": 0,
"_parent": {
"__id__": 405
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 407
},
{
"__id__": 408
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 287,
"height": 354
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
855.237,
-541.885,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "dew59luUVN+5aYitprsMPy"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 406
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "e488d09f-ba82-4ab8-a38d-bb8183e230b8"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "fbk9wO/VNIbq1zluDNQsHc"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 406
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 36,
"_left": 0,
"_right": 1.2630000000000337,
"_top": 0,
"_bottom": -118.88499999999999,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "42SUhlbE5CurZDkcLNjg9n"
},
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
"_name": "", "_name": "",
...@@ -17237,7 +17365,7 @@ ...@@ -17237,7 +17365,7 @@
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "ee527bcc-afa5-44af-bcd5-81345c569aa9" "__uuid__": "11d12f82-98da-46ec-aacb-8730b54289a4"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 0, "_sizeMode": 0,
...@@ -17306,16 +17434,16 @@ ...@@ -17306,16 +17434,16 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 410 "__id__": 413
}, },
{ {
"__id__": 411 "__id__": 414
}, },
{ {
"__id__": 412 "__id__": 415
}, },
{ {
"__id__": 413 "__id__": 416
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -17371,7 +17499,7 @@ ...@@ -17371,7 +17499,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 409 "__id__": 412
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -17403,7 +17531,7 @@ ...@@ -17403,7 +17531,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 409 "__id__": 412
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -17432,7 +17560,7 @@ ...@@ -17432,7 +17560,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 409 "__id__": 412
}, },
"_enabled": true, "_enabled": true,
"id": "", "id": "",
...@@ -17445,7 +17573,7 @@ ...@@ -17445,7 +17573,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 409 "__id__": 412
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -17506,7 +17634,7 @@ ...@@ -17506,7 +17634,7 @@
"hoverSprite": null, "hoverSprite": null,
"_N$disabledSprite": null, "_N$disabledSprite": null,
"_N$target": { "_N$target": {
"__id__": 409 "__id__": 412
}, },
"_id": "e3wAmPzt9BlYvBCfveIBBT" "_id": "e3wAmPzt9BlYvBCfveIBBT"
}, },
......
...@@ -203,8 +203,19 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -203,8 +203,19 @@ export default class SceneComponent extends MyCocosSceneComponent {
const lock = cc.find('icon_key', b); const lock = cc.find('icon_key', b);
lock.active = true; lock.active = true;
const titleNode = attr.querySelector('.title'); const titleNode = attr.querySelector('.title');
titleNode.getComponent(cc.RichText).string = `<outline align=top
width=4></outline>`; const outline = '#000';
const name = "";
const richText = titleNode.getComponent(cc.RichText);
if ( !richText.fontSizeBase ) {
richText.fontSizeBase = richText.fontSize;
}
richText.fontSize = richText.fontSizeBase;
if (name.length > 14) {
richText.fontSize = richText.fontSizeBase * 0.7;
}
titleNode.getComponent(cc.RichText).string = `<outline align=top color=${outline}
width=4>${name}</outline>`
}); });
...@@ -250,8 +261,19 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -250,8 +261,19 @@ export default class SceneComponent extends MyCocosSceneComponent {
const { parent } = b; const { parent } = b;
const pa = parent.getComponent('Attributes'); const pa = parent.getComponent('Attributes');
const { outline } = pa.attrMap; const { outline } = pa.attrMap;
const name = lesson.name;
const richText = titleNode.getComponent(cc.RichText);
if ( !richText.fontSizeBase ) {
richText.fontSizeBase = richText.fontSize;
}
richText.fontSize = richText.fontSizeBase;
if (name.length > 14) {
richText.fontSize = richText.fontSizeBase * 0.7;
}
titleNode.getComponent(cc.RichText).string = `<outline align=top color=${outline} titleNode.getComponent(cc.RichText).string = `<outline align=top color=${outline}
width=4>${lesson.name}</outline>`; width=4>${name}</outline>`;
} }
}); });
......
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "6fe41ccb-59a6-4fee-8495-0bb89b5bf711", "uuid": "e780e69c-fcfc-4479-868e-d5f1d4096c91",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
"subMetas": { "subMetas": {
"bg_front": { "bg_front": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "ee527bcc-afa5-44af-bcd5-81345c569aa9", "uuid": "11d12f82-98da-46ec-aacb-8730b54289a4",
"rawTextureUuid": "6fe41ccb-59a6-4fee-8495-0bb89b5bf711", "rawTextureUuid": "e780e69c-fcfc-4479-868e-d5f1d4096c91",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
......
{
"ver": "2.3.5",
"uuid": "6fe41ccb-59a6-4fee-8495-0bb89b5bf711",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1280,
"height": 960,
"platformSettings": {},
"subMetas": {
"bg_front_old": {
"ver": "1.0.4",
"uuid": "ee527bcc-afa5-44af-bcd5-81345c569aa9",
"rawTextureUuid": "6fe41ccb-59a6-4fee-8495-0bb89b5bf711",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1280,
"height": 960,
"rawWidth": 1280,
"rawHeight": 960,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "648cd939-3924-4361-9a27-25cea7759bc5",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 288,
"height": 355,
"platformSettings": {},
"subMetas": {
"bg_monkey_2": {
"ver": "1.0.4",
"uuid": "e488d09f-ba82-4ab8-a38d-bb8183e230b8",
"rawTextureUuid": "648cd939-3924-4361-9a27-25cea7759bc5",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -0.5,
"offsetY": 0.5,
"trimX": 0,
"trimY": 0,
"width": 287,
"height": 354,
"rawWidth": 288,
"rawHeight": 355,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment