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
d190260e
Commit
d190260e
authored
Nov 18, 2024
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 增加翻页按钮
parent
1770b381
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
194 additions
and
3 deletions
+194
-3
.DS_Store
.DS_Store
+0
-0
dg_video.fire
assets/dg_video/Scene/dg_video.fire
+130
-3
dg_video.js
assets/dg_video/Scene/dg_video.js
+28
-0
btnRight.png
assets/dg_video/Texture/btnRight.png
+0
-0
btnRight.png.meta
assets/dg_video/Texture/btnRight.png.meta
+36
-0
No files found.
.DS_Store
View file @
d190260e
No preview for this file type
assets/dg_video/Scene/dg_video.fire
View file @
d190260e
...
...
@@ -103,18 +103,21 @@
},
{
"__id__": 114
},
{
"__id__": 116
}
],
"_active": true,
"_components": [
{
"__id__": 11
6
"__id__": 11
9
},
{
"__id__": 1
17
"__id__": 1
20
},
{
"__id__": 1
18
"__id__": 1
21
}
],
"_prefab": null,
...
...
@@ -5274,6 +5277,130 @@
"_N$enableBatch": false,
"_id": "85pbnJ3DhOO5vkZVP5GeAa"
},
{
"__type__": "cc.Node",
"_name": "btn_next",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 117
},
{
"__id__": 118
}
],
"_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": [
893.239,
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": "c4DdFcHAhJ7L+aSyk9ZnxP"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 116
},
"_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": "5cDoxUOfFKXacHEyEIrroU"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 116
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 33,
"_left": 0,
"_right": 24.961000000000013,
"_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": "7fETVnCSFIY5nnwLlHapeD"
},
{
"__type__": "cc.Canvas",
"_name": "",
...
...
assets/dg_video/Scene/dg_video.js
View file @
d190260e
...
...
@@ -298,6 +298,9 @@ cc.Class({
videoItemList
:
null
,
videoPlayIndex
:
null
,
async
initView
()
{
this
.
initNextBtn
();
this
.
videoItemList
=
[];
const
videoListContent
=
cc
.
find
(
`Canvas/videolist/view/content`
);
const
templateItem
=
cc
.
find
(
`item`
,
videoListContent
);
...
...
@@ -328,6 +331,31 @@ cc.Class({
}
},
initNextBtn
()
{
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
if
(
!
middleLayer
)
{
return
;
}
if
(
!
middleLayer
.
getComponent
(
'
middleLayer
'
)?.
hasNextPage
())
{
return
;
}
const
nextBtn
=
cc
.
find
(
"
Canvas/btn_next
"
);
nextBtn
.
active
=
true
;
nextBtn
.
on
(
'
touchstart
'
,
()
=>
{
console
.
log
(
'
nextBtn touchstart
'
);
// const middleLayer = cc.find('middleLayer');
// if (middleLayer) {
middleLayer
.
getComponent
(
'
middleLayer
'
).
goNextPage
();
// }
nextBtn
.
active
=
false
;
})
},
showTips
(
tips
)
{
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
)?.
getComponent
(
'
middleLayer
'
);
if
(
middleLayer
)
{
...
...
assets/dg_video/Texture/btnRight.png
0 → 100644
View file @
d190260e
18.5 KB
assets/dg_video/Texture/btnRight.png.meta
0 → 100644
View file @
d190260e
{
"ver": "2.3.5",
"uuid": "076b61b6-b882-479b-aac9-5f055bd2d8be",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 209,
"height": 146,
"platformSettings": {},
"subMetas": {
"btnRight": {
"ver": "1.0.4",
"uuid": "d12c688a-ef21-4722-b6c7-242a37c7c342",
"rawTextureUuid": "076b61b6-b882-479b-aac9-5f055bd2d8be",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 209,
"height": 146,
"rawWidth": 209,
"rawHeight": 146,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
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