Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_jxw_demo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
middleLayer_for_jxw_demo
Commits
bb36ec63
Commit
bb36ec63
authored
Aug 22, 2025
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: test
parent
a4819124
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
89 additions
and
65 deletions
+89
-65
gamecenter.fire
...middleLayer_for_jxw_demo/pages/gamecenter/gamecenter.fire
+81
-51
gamecenter.ts
...s/middleLayer_for_jxw_demo/pages/gamecenter/gamecenter.ts
+4
-7
middleLayer_for_jxw_demo.fire
...dleLayer_for_jxw_demo/scene/middleLayer_for_jxw_demo.fire
+4
-4
middleLayer.ts
assets/middleLayer_for_jxw_demo/script/middleLayer.ts
+0
-3
No files found.
assets/middleLayer_for_jxw_demo/pages/gamecenter/gamecenter.fire
View file @
bb36ec63
...
@@ -78,22 +78,22 @@
...
@@ -78,22 +78,22 @@
"__id__": 8
"__id__": 8
},
},
{
{
"__id__": 1
2
"__id__": 1
3
},
},
{
{
"__id__": 1
5
"__id__": 1
6
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
"__id__": 24
},
{
{
"__id__": 25
"__id__": 25
},
},
{
{
"__id__": 26
"__id__": 26
},
{
"__id__": 27
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -107,8 +107,8 @@
...
@@ -107,8 +107,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width": 1
92
0,
"width": 1
28
0,
"height":
108
0
"height":
72
0
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -119,8 +119,8 @@
...
@@ -119,8 +119,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
96
0,
64
0,
54
0,
36
0,
0,
0,
0,
0,
0,
0,
...
@@ -169,8 +169,8 @@
...
@@ -169,8 +169,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
96
0,
"width":
128
0,
"height":
64
0
"height":
72
0
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -270,8 +270,8 @@
...
@@ -270,8 +270,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width": 1
92
0,
"width": 1
28
0,
"height":
108
0
"height":
72
0
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -381,6 +381,9 @@
...
@@ -381,6 +381,9 @@
},
},
{
{
"__id__": 10
"__id__": 10
},
{
"__id__": 12
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -394,8 +397,8 @@
...
@@ -394,8 +397,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
12
8,
"width":
6
8,
"height":
12
8
"height":
6
8
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -406,8 +409,8 @@
...
@@ -406,8 +409,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
-
846
,
-
581
,
426
,
301
,
0,
0,
0,
0,
0,
0,
...
@@ -547,6 +550,33 @@
...
@@ -547,6 +550,33 @@
"handler": "onClickBack",
"handler": "onClickBack",
"customEventData": ""
"customEventData": ""
},
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 9,
"_left": 25,
"_right": 0,
"_top": 25,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "39EenNBAhIUKVpj59xfD2A"
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "title_label",
"_name": "title_label",
...
@@ -558,10 +588,10 @@
...
@@ -558,10 +588,10 @@
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 1
3
"__id__": 1
4
},
},
{
{
"__id__": 1
4
"__id__": 1
5
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -575,8 +605,8 @@
...
@@ -575,8 +605,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
256
,
"width":
128
,
"height":
80.64
"height":
40.32
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -587,8 +617,8 @@
...
@@ -587,8 +617,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
-
580
,
-
456
,
420
,
299.84
,
0,
0,
0,
0,
0,
0,
...
@@ -617,7 +647,7 @@
...
@@ -617,7 +647,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
2
"__id__": 1
3
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -629,8 +659,8 @@
...
@@ -629,8 +659,8 @@
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_string": "游戏广场",
"_string": "游戏广场",
"_N$string": "游戏广场",
"_N$string": "游戏广场",
"_fontSize":
64
,
"_fontSize":
32
,
"_lineHeight":
64
,
"_lineHeight":
32
,
"_enableWrapText": true,
"_enableWrapText": true,
"_N$file": null,
"_N$file": null,
"_isSystemFontUsed": true,
"_isSystemFontUsed": true,
...
@@ -650,15 +680,15 @@
...
@@ -650,15 +680,15 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
2
"__id__": 1
3
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
"_target": null,
"_target": null,
"_alignFlags": 9,
"_alignFlags": 9,
"_left":
252
,
"_left":
120
,
"_right": 0,
"_right": 0,
"_top":
79.68
,
"_top":
40
,
"_bottom": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_horizontalCenter": 0,
...
@@ -681,7 +711,7 @@
...
@@ -681,7 +711,7 @@
},
},
"_children": [
"_children": [
{
{
"__id__": 1
6
"__id__": 1
7
}
}
],
],
"_active": true,
"_active": true,
...
@@ -739,17 +769,17 @@
...
@@ -739,17 +769,17 @@
"_name": "scroll_view",
"_name": "scroll_view",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 1
5
"__id__": 1
6
},
},
"_children": [
"_children": [
{
{
"__id__": 1
7
"__id__": 1
8
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 2
3
"__id__": 2
4
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -805,20 +835,20 @@
...
@@ -805,20 +835,20 @@
"_name": "content",
"_name": "content",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 1
6
"__id__": 1
7
},
},
"_children": [
"_children": [
{
{
"__id__": 1
8
"__id__": 1
9
},
},
{
{
"__id__": 2
0
"__id__": 2
1
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 2
2
"__id__": 2
3
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -874,13 +904,13 @@
...
@@ -874,13 +904,13 @@
"_name": "line1",
"_name": "line1",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 1
7
"__id__": 1
8
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
19
"__id__":
20
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -936,7 +966,7 @@
...
@@ -936,7 +966,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
8
"__id__": 1
9
},
},
"_enabled": true,
"_enabled": true,
"_layoutSize": {
"_layoutSize": {
...
@@ -968,13 +998,13 @@
...
@@ -968,13 +998,13 @@
"_name": "line2",
"_name": "line2",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 1
7
"__id__": 1
8
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 2
1
"__id__": 2
2
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -1030,7 +1060,7 @@
...
@@ -1030,7 +1060,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 2
0
"__id__": 2
1
},
},
"_enabled": true,
"_enabled": true,
"_layoutSize": {
"_layoutSize": {
...
@@ -1062,7 +1092,7 @@
...
@@ -1062,7 +1092,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
7
"__id__": 1
8
},
},
"_enabled": true,
"_enabled": true,
"_layoutSize": {
"_layoutSize": {
...
@@ -1094,7 +1124,7 @@
...
@@ -1094,7 +1124,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
6
"__id__": 1
7
},
},
"_enabled": true,
"_enabled": true,
"horizontal": true,
"horizontal": true,
...
@@ -1106,10 +1136,10 @@
...
@@ -1106,10 +1136,10 @@
"scrollEvents": [],
"scrollEvents": [],
"cancelInnerEvents": true,
"cancelInnerEvents": true,
"_N$content": {
"_N$content": {
"__id__": 1
7
"__id__": 1
8
},
},
"content": {
"content": {
"__id__": 1
7
"__id__": 1
8
},
},
"_id": "30yHDRW1FLSaYTIlriOrwH"
"_id": "30yHDRW1FLSaYTIlriOrwH"
},
},
...
@@ -1123,8 +1153,8 @@
...
@@ -1123,8 +1153,8 @@
"_enabled": true,
"_enabled": true,
"_designResolution": {
"_designResolution": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width": 1
92
0,
"width": 1
28
0,
"height":
108
0
"height":
72
0
},
},
"_fitWidth": true,
"_fitWidth": true,
"_fitHeight": true,
"_fitHeight": true,
...
@@ -1166,13 +1196,13 @@
...
@@ -1166,13 +1196,13 @@
},
},
"_enabled": true,
"_enabled": true,
"gameListContainer": {
"gameListContainer": {
"__id__": 1
5
"__id__": 1
6
},
},
"gameCardPrefab": {
"gameCardPrefab": {
"__uuid__": "3e0857f7-c988-4162-90e4-5e6c1887c3d6"
"__uuid__": "3e0857f7-c988-4162-90e4-5e6c1887c3d6"
},
},
"scrollView": {
"scrollView": {
"__id__": 2
3
"__id__": 2
4
},
},
"_id": "36tZootWRFMaA7LPmJ+XR/"
"_id": "36tZootWRFMaA7LPmJ+XR/"
}
}
...
...
assets/middleLayer_for_jxw_demo/pages/gamecenter/gamecenter.ts
View file @
bb36ec63
...
@@ -40,14 +40,11 @@ export default class GameCenter extends cc.Component {
...
@@ -40,14 +40,11 @@ export default class GameCenter extends cc.Component {
start
()
{
start
()
{
this
.
getGameList
();
this
.
getGameList
();
const
canvas
=
cc
.
find
(
"
middleLayer
"
);
// const backBtn = cc.find("Canvas/back_btn");
canvas
.
getComponent
(
cc
.
Widget
).
updateAlignment
();
const
backBtn
=
cc
.
find
(
"
Canvas/back_btn
"
);
// backBtn.x = -canvas.width/2 + 50 + backBtn.width/2;
// backBtn.y = canvas.height/2 - 50 - backBtn.height/2;
backBtn
.
x
=
-
canvas
.
width
/
2
+
50
+
backBtn
.
width
/
2
;
// console.log( backBtn.x, backBtn.y)
backBtn
.
y
=
canvas
.
height
/
2
-
50
-
backBtn
.
height
/
2
;
console
.
log
(
backBtn
.
x
,
backBtn
.
y
)
}
}
private
initComponents
()
{
private
initComponents
()
{
...
...
assets/middleLayer_for_jxw_demo/scene/middleLayer_for_jxw_demo.fire
View file @
bb36ec63
...
@@ -313,7 +313,7 @@
...
@@ -313,7 +313,7 @@
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width": 1280,
"width": 1280,
"height":
36
0
"height":
72
0
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -498,7 +498,7 @@
...
@@ -498,7 +498,7 @@
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
125,
125,
-
12
4.56,
-
30
4.56,
0,
0,
0,
0,
0,
0,
...
@@ -1192,8 +1192,8 @@
...
@@ -1192,8 +1192,8 @@
"_alignFlags": 45,
"_alignFlags": 45,
"_left": 0,
"_left": 0,
"_right": 0,
"_right": 0,
"_top":
18
0,
"_top": 0,
"_bottom":
18
0,
"_bottom": 0,
"_verticalCenter": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsLeft": true,
...
...
assets/middleLayer_for_jxw_demo/script/middleLayer.ts
View file @
bb36ec63
...
@@ -210,9 +210,6 @@ export default class middleLayer extends cc.Component {
...
@@ -210,9 +210,6 @@ export default class middleLayer extends cc.Component {
// 运行主场景
// 运行主场景
this
.
runMainScene
();
this
.
runMainScene
();
const
middleLayer
=
cc
.
find
(
"
middleLayer
"
);
middleLayer
.
getComponent
(
cc
.
Widget
).
updateAlignment
();
// this.homework_id = homework_id;
// this.homework_id = homework_id;
// this.syllabus_id = syllabus_id;
// this.syllabus_id = syllabus_id;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment