Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dg_video
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_video
Commits
69064595
Commit
69064595
authored
Nov 20, 2024
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 添加上一页按钮
parent
d190260e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
152 additions
and
3 deletions
+152
-3
dg_video.fire
assets/dg_video/Scene/dg_video.fire
+130
-3
dg_video.js
assets/dg_video/Scene/dg_video.js
+22
-0
No files found.
assets/dg_video/Scene/dg_video.fire
View file @
69064595
...
...
@@ -106,18 +106,21 @@
},
{
"__id__": 116
},
{
"__id__": 119
}
],
"_active": true,
"_components": [
{
"__id__": 1
19
"__id__": 1
22
},
{
"__id__": 12
0
"__id__": 12
3
},
{
"__id__": 12
1
"__id__": 12
4
}
],
"_prefab": null,
...
...
@@ -5401,6 +5404,130 @@
"_originalHeight": 0,
"_id": "7fETVnCSFIY5nnwLlHapeD"
},
{
"__type__": "cc.Node",
"_name": "btn_last",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 120
},
{
"__id__": 121
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 209,
"height": 146
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
748.079,
470,
0,
0,
0,
0,
1,
-0.4,
0.4,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "c3UYYkD+VCq6iuwN/lOCM4"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 119
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 1,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "d12c688a-ef21-4722-b6c7-242a37c7c342"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "40NFX1LUhBdqBVD5gysuLO"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 119
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 33,
"_left": 0,
"_right": 170.1210000000001,
"_top": 40.80000000000001,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "59Vj4X6ndO6YF/LLgZ3+dO"
},
{
"__type__": "cc.Canvas",
"_name": "",
...
...
assets/dg_video/Scene/dg_video.js
View file @
69064595
...
...
@@ -299,6 +299,7 @@ cc.Class({
videoPlayIndex
:
null
,
async
initView
()
{
this
.
initLastBtn
();
this
.
initNextBtn
();
this
.
videoItemList
=
[];
...
...
@@ -356,6 +357,27 @@ cc.Class({
})
},
initLastBtn
()
{
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
if
(
!
middleLayer
)
{
return
;
}
if
(
!
middleLayer
.
getComponent
(
'
middleLayer
'
)?.
hasLastPage
())
{
return
;
}
const
lastBtn
=
cc
.
find
(
"
Canvas/btn_last
"
);
lastBtn
.
active
=
true
;
lastBtn
.
on
(
'
touchstart
'
,
()
=>
{
console
.
log
(
'
lastBtn touchstart
'
);
middleLayer
.
getComponent
(
'
middleLayer
'
).
goPrePage
();
lastBtn
.
active
=
false
;
});
},
showTips
(
tips
)
{
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
)?.
getComponent
(
'
middleLayer
'
);
if
(
middleLayer
)
{
...
...
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