Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DG_FAF
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
DG_FAF
Commits
89550a46
Commit
89550a46
authored
Apr 09, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改视频弹窗显示隐藏逻辑
parent
bd157ac1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
22 deletions
+66
-22
DG_FAF.fire
assets/DG_FAF/scene/DG_FAF.fire
+46
-16
DG_FAF.ts
assets/DG_FAF/scene/DG_FAF.ts
+20
-6
No files found.
assets/DG_FAF/scene/DG_FAF.fire
View file @
89550a46
...
...
@@ -119,14 +119,14 @@
],
"_active": true,
"_components": [
{
"__id__": 896
},
{
"__id__": 897
},
{
"__id__": 898
},
{
"__id__": 899
}
],
"_prefab": null,
...
...
@@ -34413,13 +34413,13 @@
"__id__": 889
},
{
"__id__": 89
1
"__id__": 89
2
}
],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
{
"__id__": 89
5
"__id__": 89
6
}
],
"_prefab": null,
...
...
@@ -34482,6 +34482,9 @@
"_components": [
{
"__id__": 890
},
{
"__id__": 891
}
],
"_prefab": null,
...
...
@@ -34495,8 +34498,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
"width":
192
0,
"height":
120
0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -34552,6 +34555,33 @@
"_N$keepAspectRatio": true,
"_id": "2dwRPMu0FBT6coCtStcbFS"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 889
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "47GO3cdelHW6EEJk90A+7I"
},
{
"__type__": "cc.Node",
"_name": "close",
...
...
@@ -34562,14 +34592,14 @@
"_children": [],
"_active": true,
"_components": [
{
"__id__": 892
},
{
"__id__": 893
},
{
"__id__": 894
},
{
"__id__": 895
}
],
"_prefab": null,
...
...
@@ -34596,7 +34626,7 @@
"ctor": "Float64Array",
"array": [
860,
2
74.8,
4
74.8,
0,
0,
0,
...
...
@@ -34625,7 +34655,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 89
1
"__id__": 89
2
},
"_enabled": true,
"_materials": [
...
...
@@ -34658,7 +34688,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 89
1
"__id__": 89
2
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -34668,7 +34698,7 @@
"_alignFlags": 33,
"_left": 0,
"_right": 60,
"_top":
3
00,
"_top":
1
00,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
...
...
@@ -34687,7 +34717,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 89
1
"__id__": 89
2
},
"_enabled": true,
"_normalMaterial": null,
...
...
assets/DG_FAF/scene/DG_FAF.ts
View file @
89550a46
...
...
@@ -2997,12 +2997,21 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
// 显示视频播放页面
hideLayerPosSaved
=
{};
showVideoLayer
()
{
const
canvas
=
cc
.
find
(
"
Canvas
"
);
const
hideNodeNames
=
[
"
MainContent
"
,
"
Header
"
,
"
Footer
"
,
"
ActionBtnMaskBg
"
,
"
ActionBtn
"
,
"
backBtn
"
];
canvas
.
children
.
forEach
(
nodeItem
=>
{
if
(
nodeItem
.
name
!=
"
VideoPlayerContainer
"
)
{
nodeItem
.
opacity
=
0
;
}
else
{
if
(
hideNodeNames
.
indexOf
(
nodeItem
.
name
)
!=
-
1
)
{
this
.
hideLayerPosSaved
[
nodeItem
.
name
]
=
{
x
:
nodeItem
.
x
,
y
:
nodeItem
.
y
}
nodeItem
.
x
=
canvas
.
width
*
-
1
;
nodeItem
.
y
=
canvas
.
height
*
-
1
;
nodeItem
.
opacity
=
100
;
}
if
(
nodeItem
.
name
==
"
VideoPlayerContainer
"
)
{
nodeItem
.
active
=
true
;
nodeItem
.
opacity
=
255
;
}
...
...
@@ -3012,12 +3021,17 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 隐藏视频播放页面
hideVideoLayer
()
{
const
canvas
=
cc
.
find
(
"
Canvas
"
);
const
hideNodeNames
=
[
"
MainContent
"
,
"
Header
"
,
"
Footer
"
,
"
ActionBtnMaskBg
"
,
"
ActionBtn
"
,
"
backBtn
"
];
canvas
.
children
.
forEach
(
nodeItem
=>
{
if
(
hideNodeNames
.
indexOf
(
nodeItem
.
name
)
!=
-
1
)
{
nodeItem
.
x
=
this
.
hideLayerPosSaved
[
nodeItem
.
name
].
x
;
nodeItem
.
y
=
this
.
hideLayerPosSaved
[
nodeItem
.
name
].
y
;
nodeItem
.
opacity
=
255
;
}
if
(
nodeItem
.
name
==
"
VideoPlayerContainer
"
)
{
nodeItem
.
opacity
=
0
;
nodeItem
.
active
=
false
;
}
else
{
nodeItem
.
opacity
=
255
;
nodeItem
.
opacity
=
0
;
}
});
}
...
...
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