Commit aeba1710 authored by 李维's avatar 李维

feat:测试布局

parent 9d28e89c
...@@ -81,19 +81,19 @@ ...@@ -81,19 +81,19 @@
"__id__": 13 "__id__": 13
}, },
{ {
"__id__": 17 "__id__": 16
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 26 "__id__": 25
}, },
{ {
"__id__": 27 "__id__": 26
}, },
{ {
"__id__": 28 "__id__": 27
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -397,8 +397,8 @@ ...@@ -397,8 +397,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 68, "width": 128,
"height": 68 "height": 128
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -409,8 +409,8 @@ ...@@ -409,8 +409,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-868, -846,
448, 426,
0, 0,
0, 0,
0, 0,
...@@ -477,9 +477,9 @@ ...@@ -477,9 +477,9 @@
"alignMode": 1, "alignMode": 1,
"_target": null, "_target": null,
"_alignFlags": 9, "_alignFlags": 9,
"_left": 58, "_left": 50,
"_right": 0, "_right": 0,
"_top": 58, "_top": 50,
"_bottom": 0, "_bottom": 0,
"_verticalCenter": 0, "_verticalCenter": 0,
"_horizontalCenter": 0, "_horizontalCenter": 0,
...@@ -577,81 +577,19 @@ ...@@ -577,81 +577,19 @@
"handler": "onClickBack", "handler": "onClickBack",
"customEventData": "" "customEventData": ""
}, },
{
"__type__": "cc.Node",
"_name": "header",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 14
},
{
"__id__": 16
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 800,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-397.08,
442.044,
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": "c5Kwn37rFBJogCgvlRhU93"
},
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "title_label", "_name": "title_label",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 13 "__id__": 2
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{
"__id__": 14
},
{ {
"__id__": 15 "__id__": 15
} }
...@@ -667,8 +605,8 @@ ...@@ -667,8 +605,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 128, "width": 256,
"height": 40.32 "height": 80.64
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -679,8 +617,8 @@ ...@@ -679,8 +617,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, -582,
0, 424.68,
0, 0,
0, 0,
0, 0,
...@@ -709,7 +647,7 @@ ...@@ -709,7 +647,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 14 "__id__": 13
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -721,8 +659,8 @@ ...@@ -721,8 +659,8 @@
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_string": "游戏广场", "_string": "游戏广场",
"_N$string": "游戏广场", "_N$string": "游戏广场",
"_fontSize": 32, "_fontSize": 64,
"_lineHeight": 32, "_lineHeight": 64,
"_enableWrapText": true, "_enableWrapText": true,
"_N$file": null, "_N$file": null,
"_isSystemFontUsed": true, "_isSystemFontUsed": true,
...@@ -738,62 +676,31 @@ ...@@ -738,62 +676,31 @@
"_id": "edOtIKUDdHJanv0iuIsgPx" "_id": "edOtIKUDdHJanv0iuIsgPx"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Widget",
"_name": "icon_back", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "node": {
"__id__": 13 "__id__": 13
}, },
"_children": [], "_enabled": true,
"_active": true, "alignMode": 1,
"_components": [], "_target": null,
"_prefab": null, "_alignFlags": 9,
"_opacity": 255, "_left": 250,
"_color": { "_right": 0,
"__type__": "cc.Color", "_top": 75,
"r": 255, "_bottom": 0,
"g": 255, "_verticalCenter": 0,
"b": 255, "_horizontalCenter": 0,
"a": 255 "_isAbsLeft": true,
}, "_isAbsRight": true,
"_contentSize": { "_isAbsTop": true,
"__type__": "cc.Size", "_isAbsBottom": true,
"width": 0, "_isAbsHorizontalCenter": true,
"height": 0 "_isAbsVerticalCenter": true,
}, "_originalWidth": 0,
"_anchorPoint": { "_originalHeight": 0,
"__type__": "cc.Vec2", "_id": "78a3DbOKtCtaFfcLZHAk2e"
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
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": "abBn52Pk5CuLG3cVNbL2r1"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
...@@ -804,7 +711,7 @@ ...@@ -804,7 +711,7 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 18 "__id__": 17
} }
], ],
"_active": true, "_active": true,
...@@ -862,17 +769,17 @@ ...@@ -862,17 +769,17 @@
"_name": "scroll_view", "_name": "scroll_view",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 17 "__id__": 16
}, },
"_children": [ "_children": [
{ {
"__id__": 19 "__id__": 18
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 25 "__id__": 24
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -928,20 +835,20 @@ ...@@ -928,20 +835,20 @@
"_name": "content", "_name": "content",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 18 "__id__": 17
}, },
"_children": [ "_children": [
{ {
"__id__": 20 "__id__": 19
}, },
{ {
"__id__": 22 "__id__": 21
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 24 "__id__": 23
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -997,13 +904,13 @@ ...@@ -997,13 +904,13 @@
"_name": "line1", "_name": "line1",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 19 "__id__": 18
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 21 "__id__": 20
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1059,7 +966,7 @@ ...@@ -1059,7 +966,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 20 "__id__": 19
}, },
"_enabled": true, "_enabled": true,
"_layoutSize": { "_layoutSize": {
...@@ -1091,13 +998,13 @@ ...@@ -1091,13 +998,13 @@
"_name": "line2", "_name": "line2",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 19 "__id__": 18
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 23 "__id__": 22
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1153,7 +1060,7 @@ ...@@ -1153,7 +1060,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 22 "__id__": 21
}, },
"_enabled": true, "_enabled": true,
"_layoutSize": { "_layoutSize": {
...@@ -1185,7 +1092,7 @@ ...@@ -1185,7 +1092,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 19 "__id__": 18
}, },
"_enabled": true, "_enabled": true,
"_layoutSize": { "_layoutSize": {
...@@ -1217,7 +1124,7 @@ ...@@ -1217,7 +1124,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 18 "__id__": 17
}, },
"_enabled": true, "_enabled": true,
"horizontal": true, "horizontal": true,
...@@ -1229,10 +1136,10 @@ ...@@ -1229,10 +1136,10 @@
"scrollEvents": [], "scrollEvents": [],
"cancelInnerEvents": true, "cancelInnerEvents": true,
"_N$content": { "_N$content": {
"__id__": 19 "__id__": 18
}, },
"content": { "content": {
"__id__": 19 "__id__": 18
}, },
"_id": "30yHDRW1FLSaYTIlriOrwH" "_id": "30yHDRW1FLSaYTIlriOrwH"
}, },
...@@ -1289,13 +1196,13 @@ ...@@ -1289,13 +1196,13 @@
}, },
"_enabled": true, "_enabled": true,
"gameListContainer": { "gameListContainer": {
"__id__": 17 "__id__": 16
}, },
"gameCardPrefab": { "gameCardPrefab": {
"__uuid__": "3e0857f7-c988-4162-90e4-5e6c1887c3d6" "__uuid__": "3e0857f7-c988-4162-90e4-5e6c1887c3d6"
}, },
"scrollView": { "scrollView": {
"__id__": 25 "__id__": 24
}, },
"_id": "36tZootWRFMaA7LPmJ+XR/" "_id": "36tZootWRFMaA7LPmJ+XR/"
} }
......
...@@ -39,6 +39,9 @@ export default class GameCenter extends cc.Component { ...@@ -39,6 +39,9 @@ export default class GameCenter extends cc.Component {
start() { start() {
this.getGameList(); this.getGameList();
const canvas = cc.find("Canvas");
canvas.getComponent(cc.Widget).updateAlignment();
} }
private initComponents() { private initComponents() {
......
...@@ -776,8 +776,8 @@ ...@@ -776,8 +776,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 68, "width": 128,
"height": 68 "height": 128
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -826,9 +826,9 @@ ...@@ -826,9 +826,9 @@
"__id__": 2 "__id__": 2
}, },
"_alignFlags": 9, "_alignFlags": 9,
"_left": 24, "_left": 50,
"_right": 0, "_right": 0,
"_top": 24, "_top": 50,
"_bottom": 0, "_bottom": 0,
"_verticalCenter": 0, "_verticalCenter": 0,
"_horizontalCenter": 0, "_horizontalCenter": 0,
......
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