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
3ad86232
Commit
3ad86232
authored
Aug 22, 2025
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: test
parent
96c07869
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
67 deletions
+39
-67
gamecenter.fire
...middleLayer_for_jxw_demo/pages/gamecenter/gamecenter.fire
+34
-64
gamecenter.ts
...s/middleLayer_for_jxw_demo/pages/gamecenter/gamecenter.ts
+5
-3
No files found.
assets/middleLayer_for_jxw_demo/pages/gamecenter/gamecenter.fire
View file @
3ad86232
...
@@ -78,22 +78,22 @@
...
@@ -78,22 +78,22 @@
"__id__": 8
"__id__": 8
},
},
{
{
"__id__": 1
3
"__id__": 1
2
},
},
{
{
"__id__": 1
6
"__id__": 1
5
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 2
5
"__id__": 2
4
},
},
{
{
"__id__": 2
6
"__id__": 2
5
},
},
{
{
"__id__": 2
7
"__id__": 2
6
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -381,9 +381,6 @@
...
@@ -381,9 +381,6 @@
},
},
{
{
"__id__": 10
"__id__": 10
},
{
"__id__": 11
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -466,33 +463,6 @@
...
@@ -466,33 +463,6 @@
"_atlas": null,
"_atlas": null,
"_id": "63utL93tpNEJlTxuyYFF+L"
"_id": "63utL93tpNEJlTxuyYFF+L"
},
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 9,
"_left": 50,
"_right": 0,
"_top": 50,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "02+HX++hBNMKzKrRfAnSDQ"
},
{
{
"__type__": "cc.Button",
"__type__": "cc.Button",
"_name": "",
"_name": "",
...
@@ -507,7 +477,7 @@
...
@@ -507,7 +477,7 @@
"zoomScale": 1.2,
"zoomScale": 1.2,
"clickEvents": [
"clickEvents": [
{
{
"__id__": 1
2
"__id__": 1
1
}
}
],
],
"_N$interactable": true,
"_N$interactable": true,
...
@@ -588,10 +558,10 @@
...
@@ -588,10 +558,10 @@
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 1
4
"__id__": 1
3
},
},
{
{
"__id__": 1
5
"__id__": 1
4
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -617,8 +587,8 @@
...
@@ -617,8 +587,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
-58
2
,
-58
0
,
42
4.68
,
42
0
,
0,
0,
0,
0,
0,
0,
...
@@ -647,7 +617,7 @@
...
@@ -647,7 +617,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
3
"__id__": 1
2
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -680,15 +650,15 @@
...
@@ -680,15 +650,15 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
3
"__id__": 1
2
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
"_target": null,
"_target": null,
"_alignFlags": 9,
"_alignFlags": 9,
"_left": 25
0
,
"_left": 25
2
,
"_right": 0,
"_right": 0,
"_top": 7
5
,
"_top": 7
9.68
,
"_bottom": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_horizontalCenter": 0,
...
@@ -711,7 +681,7 @@
...
@@ -711,7 +681,7 @@
},
},
"_children": [
"_children": [
{
{
"__id__": 1
7
"__id__": 1
6
}
}
],
],
"_active": true,
"_active": true,
...
@@ -769,17 +739,17 @@
...
@@ -769,17 +739,17 @@
"_name": "scroll_view",
"_name": "scroll_view",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 1
6
"__id__": 1
5
},
},
"_children": [
"_children": [
{
{
"__id__": 1
8
"__id__": 1
7
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 2
4
"__id__": 2
3
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -835,20 +805,20 @@
...
@@ -835,20 +805,20 @@
"_name": "content",
"_name": "content",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 1
7
"__id__": 1
6
},
},
"_children": [
"_children": [
{
{
"__id__": 1
9
"__id__": 1
8
},
},
{
{
"__id__": 2
1
"__id__": 2
0
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 2
3
"__id__": 2
2
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -904,13 +874,13 @@
...
@@ -904,13 +874,13 @@
"_name": "line1",
"_name": "line1",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 1
8
"__id__": 1
7
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
20
"__id__":
19
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -966,7 +936,7 @@
...
@@ -966,7 +936,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
9
"__id__": 1
8
},
},
"_enabled": true,
"_enabled": true,
"_layoutSize": {
"_layoutSize": {
...
@@ -998,13 +968,13 @@
...
@@ -998,13 +968,13 @@
"_name": "line2",
"_name": "line2",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 1
8
"__id__": 1
7
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 2
2
"__id__": 2
1
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -1060,7 +1030,7 @@
...
@@ -1060,7 +1030,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 2
1
"__id__": 2
0
},
},
"_enabled": true,
"_enabled": true,
"_layoutSize": {
"_layoutSize": {
...
@@ -1092,7 +1062,7 @@
...
@@ -1092,7 +1062,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
8
"__id__": 1
7
},
},
"_enabled": true,
"_enabled": true,
"_layoutSize": {
"_layoutSize": {
...
@@ -1124,7 +1094,7 @@
...
@@ -1124,7 +1094,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
7
"__id__": 1
6
},
},
"_enabled": true,
"_enabled": true,
"horizontal": true,
"horizontal": true,
...
@@ -1136,10 +1106,10 @@
...
@@ -1136,10 +1106,10 @@
"scrollEvents": [],
"scrollEvents": [],
"cancelInnerEvents": true,
"cancelInnerEvents": true,
"_N$content": {
"_N$content": {
"__id__": 1
8
"__id__": 1
7
},
},
"content": {
"content": {
"__id__": 1
8
"__id__": 1
7
},
},
"_id": "30yHDRW1FLSaYTIlriOrwH"
"_id": "30yHDRW1FLSaYTIlriOrwH"
},
},
...
@@ -1196,13 +1166,13 @@
...
@@ -1196,13 +1166,13 @@
},
},
"_enabled": true,
"_enabled": true,
"gameListContainer": {
"gameListContainer": {
"__id__": 1
6
"__id__": 1
5
},
},
"gameCardPrefab": {
"gameCardPrefab": {
"__uuid__": "3e0857f7-c988-4162-90e4-5e6c1887c3d6"
"__uuid__": "3e0857f7-c988-4162-90e4-5e6c1887c3d6"
},
},
"scrollView": {
"scrollView": {
"__id__": 2
4
"__id__": 2
3
},
},
"_id": "36tZootWRFMaA7LPmJ+XR/"
"_id": "36tZootWRFMaA7LPmJ+XR/"
}
}
...
...
assets/middleLayer_for_jxw_demo/pages/gamecenter/gamecenter.ts
View file @
3ad86232
...
@@ -43,9 +43,11 @@ export default class GameCenter extends cc.Component {
...
@@ -43,9 +43,11 @@ export default class GameCenter extends cc.Component {
const
canvas
=
cc
.
find
(
"
middleLayer
"
);
const
canvas
=
cc
.
find
(
"
middleLayer
"
);
canvas
.
getComponent
(
cc
.
Widget
).
updateAlignment
();
canvas
.
getComponent
(
cc
.
Widget
).
updateAlignment
();
const
backBtn
=
cc
.
find
(
"
middleLayer/back_btn
"
);
const
backBtn
=
cc
.
find
(
"
Canvas/back_btn
"
);
backBtn
.
x
=
80
;
backBtn
.
y
=
0
;
backBtn
.
x
=
-
canvas
.
width
/
2
+
50
+
backBtn
.
width
/
2
;
backBtn
.
y
=
canvas
.
height
/
2
-
50
-
backBtn
.
height
/
2
;
console
.
log
(
backBtn
.
x
,
backBtn
.
y
)
}
}
private
initComponents
()
{
private
initComponents
()
{
...
...
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