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

调整翻页按钮显示隐藏

parent e53860d5
......@@ -96,28 +96,25 @@
"__id__": 119
},
{
"__id__": 124
},
{
"__id__": 129
"__id__": 130
},
{
"__id__": 132
"__id__": 133
},
{
"__id__": 134
"__id__": 135
}
],
"_active": true,
"_components": [
{
"__id__": 136
},
{
"__id__": 137
},
{
"__id__": 138
},
{
"__id__": 139
}
],
"_prefab": null,
......@@ -5420,22 +5417,87 @@
},
{
"__type__": "cc.Node",
"_name": "btn_last",
"_name": "pageButton",
"_objFlags": 0,
"_parent": {
"__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": [],
"_active": true,
"_components": [
{
"__id__": 120
"__id__": 121
},
{
"__id__": 121
"__id__": 122
},
{
"__id__": 123
"__id__": 124
}
],
"_prefab": null,
......@@ -5462,7 +5524,7 @@
"ctor": "Float64Array",
"array": [
-658.5,
88.5,
150,
0,
0,
0,
......@@ -5491,7 +5553,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 119
"__id__": 120
},
"_enabled": true,
"_materials": [
......@@ -5523,7 +5585,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 119
"__id__": 120
},
"_enabled": true,
"_normalMaterial": null,
......@@ -5532,7 +5594,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 122
"__id__": 123
}
],
"_N$interactable": true,
......@@ -5588,7 +5650,7 @@
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 119
"__id__": 120
},
"_id": "63sqlR0bVEJrqaAhyT+FzF"
},
......@@ -5607,19 +5669,19 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 119
"__id__": 120
},
"_enabled": true,
"alignMode": 1,
"_target": {
"__id__": 2
},
"_alignFlags": 9,
"_alignFlags": 10,
"_left": 250,
"_right": 0,
"_top": 400,
"_bottom": 0,
"_verticalCenter": 0,
"_bottom": 577,
"_verticalCenter": 150,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
......@@ -5628,7 +5690,7 @@
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_originalHeight": 103,
"_id": "09WKwl6N9DlIVhmb+dle11"
},
{
......@@ -5636,19 +5698,19 @@
"_name": "btn_next",
"_objFlags": 0,
"_parent": {
"__id__": 2
"__id__": 119
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 125
"__id__": 126
},
{
"__id__": 126
"__id__": 127
},
{
"__id__": 128
"__id__": 129
}
],
"_prefab": null,
......@@ -5675,7 +5737,7 @@
"ctor": "Float64Array",
"array": [
658.5,
88.5,
150,
0,
0,
0,
......@@ -5704,7 +5766,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 124
"__id__": 125
},
"_enabled": true,
"_materials": [
......@@ -5736,7 +5798,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 124
"__id__": 125
},
"_enabled": true,
"_normalMaterial": null,
......@@ -5745,7 +5807,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 127
"__id__": 128
}
],
"_N$interactable": true,
......@@ -5801,7 +5863,7 @@
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 124
"__id__": 125
},
"_id": "3aZJp/FzlONJO+/okrPRip"
},
......@@ -5820,19 +5882,19 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 124
"__id__": 125
},
"_enabled": true,
"alignMode": 1,
"_target": {
"__id__": 2
},
"_alignFlags": 33,
"_alignFlags": 34,
"_left": 1580.964,
"_right": 250,
"_top": 400,
"_bottom": 0,
"_verticalCenter": 0,
"_verticalCenter": 150,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
......@@ -5855,10 +5917,10 @@
"_active": true,
"_components": [
{
"__id__": 130
"__id__": 131
},
{
"__id__": 131
"__id__": 132
}
],
"_prefab": null,
......@@ -5914,7 +5976,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 129
"__id__": 130
},
"_enabled": true,
"_materials": [
......@@ -5947,7 +6009,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 129
"__id__": 130
},
"_enabled": true,
"alignMode": 1,
......@@ -5980,7 +6042,7 @@
"_active": false,
"_components": [
{
"__id__": 133
"__id__": 134
}
],
"_prefab": null,
......@@ -6036,7 +6098,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 132
"__id__": 133
},
"_enabled": true,
"_materials": [
......@@ -6074,7 +6136,7 @@
"_active": false,
"_components": [
{
"__id__": 135
"__id__": 136
}
],
"_prefab": null,
......@@ -6130,7 +6192,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 134
"__id__": 135
},
"_enabled": true,
"_materials": [
......@@ -6247,7 +6309,7 @@
"__id__": 36
},
"loadingSprite": {
"__id__": 134
"__id__": 135
},
"_id": "c0ovD3YW1IbKk/Fh2N2zzp"
}
......
......@@ -134,17 +134,6 @@ export default class VideoPlayerComponent extends cc.Component {
cc.debug.setDisplayStats(false);
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;
cc.macro.ENABLE_TRANSPARENT_CANVAS = true;
......@@ -152,7 +141,6 @@ export default class VideoPlayerComponent extends cc.Component {
this.videoPlayer.node.on('ready-to-play', () => {
console.log('ready-to-play');
this.playButton.node.active = true;
// cc.find(`Canvas/loading`).active = false;
this.durationLabel.string = this.formatTime(this.videoPlayer.getDuration());
this._isReadyToPlay = true;
this._isPlayComplated = false;
......@@ -242,8 +230,9 @@ export default class VideoPlayerComponent extends cc.Component {
refreshLastNextBtns(){
cc.find("Canvas/btn_last").active=this.videoPlayIndex!=0
if (this.videoItemList)
cc.find("Canvas/btn_next").active=this.videoPlayIndex!=this.videoItemList.length-1
if (this.videoItemList) {
cc.find("Canvas/btn_next").active=this.videoPlayIndex!=this.videoItemList.length-1
}
}
onClickNext(){
......@@ -440,10 +429,6 @@ export default class VideoPlayerComponent extends cc.Component {
cc.find(`Canvas/video_node`).width *= 1.2;
cc.find(`Canvas/video_node`).height *= 1.2;
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/Controls`).scale = 1.2;
cc.find(`Canvas/Controls`).y = -670;
......@@ -577,7 +562,7 @@ export default class VideoPlayerComponent extends cc.Component {
cc.find(`Canvas/Controls/exitfull`).active = this.isVideoFull;
cc.find(`Canvas/btn_return`).active = !this.isVideoFull;
cc.find(`Canvas/title`).active = !this.isVideoFull;
cc.find('Canvas/pageButton').active = false;
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.width *= videoContainer.scale;
......@@ -625,7 +610,8 @@ export default class VideoPlayerComponent extends cc.Component {
cc.find(`Canvas/Controls/exitfull`).active = this.isVideoFull;
cc.find(`Canvas/btn_return`).active = !this.isVideoFull;
cc.find(`Canvas/title`).active = !this.isVideoFull;
cc.find('Canvas/pageButton').active = true;
const videoContainer = cc.find('Canvas/video_node');
videoContainer.width = this.tempPos.videoPos.width;
videoContainer.height = this.tempPos.videoPos.height;
......
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