Commit 83cf299f authored by 李维's avatar 李维

调整翻页按钮显示隐藏

parent e53860d5
...@@ -96,28 +96,25 @@ ...@@ -96,28 +96,25 @@
"__id__": 119 "__id__": 119
}, },
{ {
"__id__": 124 "__id__": 130
},
{
"__id__": 129
}, },
{ {
"__id__": 132 "__id__": 133
}, },
{ {
"__id__": 134 "__id__": 135
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{
"__id__": 136
},
{ {
"__id__": 137 "__id__": 137
}, },
{ {
"__id__": 138 "__id__": 138
},
{
"__id__": 139
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -5420,22 +5417,87 @@ ...@@ -5420,22 +5417,87 @@
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "btn_last", "_name": "pageButton",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 2 "__id__": 2
}, },
"_children": [
{
"__id__": 120
},
{
"__id__": 125
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "b5mILpcM5Ou4v8DVL0n7wo"
},
{
"__type__": "cc.Node",
"_name": "btn_last",
"_objFlags": 0,
"_parent": {
"__id__": 119
},
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 120 "__id__": 121
}, },
{ {
"__id__": 121 "__id__": 122
}, },
{ {
"__id__": 123 "__id__": 124
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -5462,7 +5524,7 @@ ...@@ -5462,7 +5524,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-658.5, -658.5,
88.5, 150,
0, 0,
0, 0,
0, 0,
...@@ -5491,7 +5553,7 @@ ...@@ -5491,7 +5553,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 119 "__id__": 120
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -5523,7 +5585,7 @@ ...@@ -5523,7 +5585,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 119 "__id__": 120
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -5532,7 +5594,7 @@ ...@@ -5532,7 +5594,7 @@
"zoomScale": 1.2, "zoomScale": 1.2,
"clickEvents": [ "clickEvents": [
{ {
"__id__": 122 "__id__": 123
} }
], ],
"_N$interactable": true, "_N$interactable": true,
...@@ -5588,7 +5650,7 @@ ...@@ -5588,7 +5650,7 @@
"hoverSprite": null, "hoverSprite": null,
"_N$disabledSprite": null, "_N$disabledSprite": null,
"_N$target": { "_N$target": {
"__id__": 119 "__id__": 120
}, },
"_id": "63sqlR0bVEJrqaAhyT+FzF" "_id": "63sqlR0bVEJrqaAhyT+FzF"
}, },
...@@ -5607,19 +5669,19 @@ ...@@ -5607,19 +5669,19 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 119 "__id__": 120
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
"_target": { "_target": {
"__id__": 2 "__id__": 2
}, },
"_alignFlags": 9, "_alignFlags": 10,
"_left": 250, "_left": 250,
"_right": 0, "_right": 0,
"_top": 400, "_top": 400,
"_bottom": 0, "_bottom": 577,
"_verticalCenter": 0, "_verticalCenter": 150,
"_horizontalCenter": 0, "_horizontalCenter": 0,
"_isAbsLeft": true, "_isAbsLeft": true,
"_isAbsRight": true, "_isAbsRight": true,
...@@ -5628,7 +5690,7 @@ ...@@ -5628,7 +5690,7 @@
"_isAbsHorizontalCenter": true, "_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true, "_isAbsVerticalCenter": true,
"_originalWidth": 0, "_originalWidth": 0,
"_originalHeight": 0, "_originalHeight": 103,
"_id": "09WKwl6N9DlIVhmb+dle11" "_id": "09WKwl6N9DlIVhmb+dle11"
}, },
{ {
...@@ -5636,19 +5698,19 @@ ...@@ -5636,19 +5698,19 @@
"_name": "btn_next", "_name": "btn_next",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 2 "__id__": 119
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 125 "__id__": 126
}, },
{ {
"__id__": 126 "__id__": 127
}, },
{ {
"__id__": 128 "__id__": 129
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -5675,7 +5737,7 @@ ...@@ -5675,7 +5737,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
658.5, 658.5,
88.5, 150,
0, 0,
0, 0,
0, 0,
...@@ -5704,7 +5766,7 @@ ...@@ -5704,7 +5766,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 124 "__id__": 125
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -5736,7 +5798,7 @@ ...@@ -5736,7 +5798,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 124 "__id__": 125
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -5745,7 +5807,7 @@ ...@@ -5745,7 +5807,7 @@
"zoomScale": 1.2, "zoomScale": 1.2,
"clickEvents": [ "clickEvents": [
{ {
"__id__": 127 "__id__": 128
} }
], ],
"_N$interactable": true, "_N$interactable": true,
...@@ -5801,7 +5863,7 @@ ...@@ -5801,7 +5863,7 @@
"hoverSprite": null, "hoverSprite": null,
"_N$disabledSprite": null, "_N$disabledSprite": null,
"_N$target": { "_N$target": {
"__id__": 124 "__id__": 125
}, },
"_id": "3aZJp/FzlONJO+/okrPRip" "_id": "3aZJp/FzlONJO+/okrPRip"
}, },
...@@ -5820,19 +5882,19 @@ ...@@ -5820,19 +5882,19 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 124 "__id__": 125
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
"_target": { "_target": {
"__id__": 2 "__id__": 2
}, },
"_alignFlags": 33, "_alignFlags": 34,
"_left": 1580.964, "_left": 1580.964,
"_right": 250, "_right": 250,
"_top": 400, "_top": 400,
"_bottom": 0, "_bottom": 0,
"_verticalCenter": 0, "_verticalCenter": 150,
"_horizontalCenter": 0, "_horizontalCenter": 0,
"_isAbsLeft": true, "_isAbsLeft": true,
"_isAbsRight": true, "_isAbsRight": true,
...@@ -5855,10 +5917,10 @@ ...@@ -5855,10 +5917,10 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 130 "__id__": 131
}, },
{ {
"__id__": 131 "__id__": 132
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -5914,7 +5976,7 @@ ...@@ -5914,7 +5976,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 129 "__id__": 130
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -5947,7 +6009,7 @@ ...@@ -5947,7 +6009,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 129 "__id__": 130
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -5980,7 +6042,7 @@ ...@@ -5980,7 +6042,7 @@
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 133 "__id__": 134
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -6036,7 +6098,7 @@ ...@@ -6036,7 +6098,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 132 "__id__": 133
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -6074,7 +6136,7 @@ ...@@ -6074,7 +6136,7 @@
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 135 "__id__": 136
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -6130,7 +6192,7 @@ ...@@ -6130,7 +6192,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 134 "__id__": 135
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -6247,7 +6309,7 @@ ...@@ -6247,7 +6309,7 @@
"__id__": 36 "__id__": 36
}, },
"loadingSprite": { "loadingSprite": {
"__id__": 134 "__id__": 135
}, },
"_id": "c0ovD3YW1IbKk/Fh2N2zzp" "_id": "c0ovD3YW1IbKk/Fh2N2zzp"
} }
......
...@@ -134,17 +134,6 @@ export default class VideoPlayerComponent extends cc.Component { ...@@ -134,17 +134,6 @@ export default class VideoPlayerComponent extends cc.Component {
cc.debug.setDisplayStats(false); cc.debug.setDisplayStats(false);
this.initSize(); this.initSize();
// cc.find('Canvas/bg').scale = this._mapScaleMax;
// cc.find('Canvas/video_node/bg').scale = this._mapScaleMax;
// cc.find('Canvas/bgwhite').zIndex=-2
// cc.find('Canvas/bg').zIndex=-1
// cc.find('Canvas/VideoNode').zIndex=0
// cc.find('Canvas/video_node').zIndex=1
// cc.find('Canvas/Controls').zIndex=3
// cc.find('Canvas/videolist').zIndex=4
// cc.find('Canvas/btn_return').zIndex=5
// cc.find('Canvas/title').zIndex=5
this._isReadyToPlay = false; this._isReadyToPlay = false;
cc.macro.ENABLE_TRANSPARENT_CANVAS = true; cc.macro.ENABLE_TRANSPARENT_CANVAS = true;
...@@ -152,7 +141,6 @@ export default class VideoPlayerComponent extends cc.Component { ...@@ -152,7 +141,6 @@ export default class VideoPlayerComponent extends cc.Component {
this.videoPlayer.node.on('ready-to-play', () => { this.videoPlayer.node.on('ready-to-play', () => {
console.log('ready-to-play'); console.log('ready-to-play');
this.playButton.node.active = true; this.playButton.node.active = true;
// cc.find(`Canvas/loading`).active = false;
this.durationLabel.string = this.formatTime(this.videoPlayer.getDuration()); this.durationLabel.string = this.formatTime(this.videoPlayer.getDuration());
this._isReadyToPlay = true; this._isReadyToPlay = true;
this._isPlayComplated = false; this._isPlayComplated = false;
...@@ -242,9 +230,10 @@ export default class VideoPlayerComponent extends cc.Component { ...@@ -242,9 +230,10 @@ export default class VideoPlayerComponent extends cc.Component {
refreshLastNextBtns(){ refreshLastNextBtns(){
cc.find("Canvas/btn_last").active=this.videoPlayIndex!=0 cc.find("Canvas/btn_last").active=this.videoPlayIndex!=0
if (this.videoItemList) if (this.videoItemList) {
cc.find("Canvas/btn_next").active=this.videoPlayIndex!=this.videoItemList.length-1 cc.find("Canvas/btn_next").active=this.videoPlayIndex!=this.videoItemList.length-1
} }
}
onClickNext(){ onClickNext(){
const nextItem = this.videoItemList[this.videoPlayIndex + 1]; const nextItem = this.videoItemList[this.videoPlayIndex + 1];
...@@ -440,10 +429,6 @@ export default class VideoPlayerComponent extends cc.Component { ...@@ -440,10 +429,6 @@ export default class VideoPlayerComponent extends cc.Component {
cc.find(`Canvas/video_node`).width *= 1.2; cc.find(`Canvas/video_node`).width *= 1.2;
cc.find(`Canvas/video_node`).height *= 1.2; cc.find(`Canvas/video_node`).height *= 1.2;
cc.find(`Canvas/video_node`).y = 93.311; cc.find(`Canvas/video_node`).y = 93.311;
cc.find(`Canvas/btn_last`).x = -734.101;
cc.find(`Canvas/btn_last`).y = -39.603;
cc.find(`Canvas/btn_next`).x = 734.101;
cc.find(`Canvas/btn_next`).y = -39.603;
cc.find(`Canvas/VideoNode`).scale = 1.439; cc.find(`Canvas/VideoNode`).scale = 1.439;
cc.find(`Canvas/Controls`).scale = 1.2; cc.find(`Canvas/Controls`).scale = 1.2;
cc.find(`Canvas/Controls`).y = -670; cc.find(`Canvas/Controls`).y = -670;
...@@ -577,7 +562,7 @@ export default class VideoPlayerComponent extends cc.Component { ...@@ -577,7 +562,7 @@ export default class VideoPlayerComponent extends cc.Component {
cc.find(`Canvas/Controls/exitfull`).active = this.isVideoFull; cc.find(`Canvas/Controls/exitfull`).active = this.isVideoFull;
cc.find(`Canvas/btn_return`).active = !this.isVideoFull; cc.find(`Canvas/btn_return`).active = !this.isVideoFull;
cc.find(`Canvas/title`).active = !this.isVideoFull; cc.find(`Canvas/title`).active = !this.isVideoFull;
cc.find('Canvas/pageButton').active = false;
const videoContainer = cc.find('Canvas/video_node'); const videoContainer = cc.find('Canvas/video_node');
this.tempPos.videoPos = { x: videoContainer.x, y: videoContainer.y, width: videoContainer.width, height: videoContainer.height, scale: this.videoPlayer.node.scale }; this.tempPos.videoPos = { x: videoContainer.x, y: videoContainer.y, width: videoContainer.width, height: videoContainer.height, scale: this.videoPlayer.node.scale };
// this.tempPos.videoPos.width *= videoContainer.scale; // this.tempPos.videoPos.width *= videoContainer.scale;
...@@ -625,6 +610,7 @@ export default class VideoPlayerComponent extends cc.Component { ...@@ -625,6 +610,7 @@ export default class VideoPlayerComponent extends cc.Component {
cc.find(`Canvas/Controls/exitfull`).active = this.isVideoFull; cc.find(`Canvas/Controls/exitfull`).active = this.isVideoFull;
cc.find(`Canvas/btn_return`).active = !this.isVideoFull; cc.find(`Canvas/btn_return`).active = !this.isVideoFull;
cc.find(`Canvas/title`).active = !this.isVideoFull; cc.find(`Canvas/title`).active = !this.isVideoFull;
cc.find('Canvas/pageButton').active = true;
const videoContainer = cc.find('Canvas/video_node'); const videoContainer = cc.find('Canvas/video_node');
videoContainer.width = this.tempPos.videoPos.width; videoContainer.width = this.tempPos.videoPos.width;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment