Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
apk_product
/
ForFun
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
31fc8e35
...
31fc8e35e144fb6e411b78bb7125df9955ce5089
authored
2020-04-01 17:33:58 +0800
by
金学艇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.修改了视频详情页
1 parent
12218b03
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
182 additions
and
121 deletions
assets/Scene/sceneVideoDetail.fire
assets/Script/gameCategory.js
assets/Script/videoDetail.js
assets/Scene/sceneVideoDetail.fire
View file @
31fc8e3
...
...
@@ -57,7 +57,7 @@
"_is3DNode": true,
"_groupIndex": 0,
"groupIndex": 0,
"autoReleaseAssets":
fals
e,
"autoReleaseAssets":
tru
e,
"_id": "704d4ab7-0300-44ac-9b6e-ba3076e019c9"
},
{
...
...
@@ -96,28 +96,28 @@
"__id__": 35
},
{
"__id__": 4
0
"__id__": 4
1
},
{
"__id__": 5
4
"__id__": 5
5
},
{
"__id__": 6
2
"__id__": 6
3
},
{
"__id__": 6
8
"__id__": 6
9
},
{
"__id__": 5
7
"__id__": 5
8
}
],
"_active": true,
"_components": [
{
"__id__": 7
7
"__id__": 7
8
},
{
"__id__": 7
8
"__id__": 7
9
}
],
"_prefab": null,
...
...
@@ -207,7 +207,7 @@
"array": [
0,
0,
2
65.0037841796875
,
2
47.68325805664062
,
0,
0,
0,
...
...
@@ -1542,7 +1542,7 @@
"_active": true,
"_components": [
{
"__id__":
39
"__id__":
40
}
],
"_prefab": null,
...
...
@@ -1620,7 +1620,7 @@
"_active": true,
"_components": [
{
"__id__": 3
8
"__id__": 3
9
}
],
"_prefab": null,
...
...
@@ -1634,7 +1634,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 12
3
6,
"width": 12
1
6,
"height": 180
},
"_anchorPoint": {
...
...
@@ -1658,7 +1658,7 @@
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
-6
2
8,
-6
0
8,
0,
0,
0,
...
...
@@ -1692,7 +1692,11 @@
},
"_children": [],
"_active": true,
"_components": [],
"_components": [
{
"__id__": 38
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
...
...
@@ -1704,7 +1708,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1
17
6,
"width": 1
21
6,
"height": 0
},
"_anchorPoint": {
...
...
@@ -1728,7 +1732,7 @@
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
2
0,
0,
0,
0,
0,
...
...
@@ -1754,6 +1758,39 @@
"_id": "f5Z3KDl6xH3L5s0OCNIyOO"
},
{
"__type__": "cc.Layout",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 37
},
"_enabled": true,
"_layoutSize": {
"__type__": "cc.Size",
"width": 1216,
"height": 0
},
"_resize": 1,
"_N$layoutType": 1,
"_N$padding": 0,
"_N$cellSize": {
"__type__": "cc.Size",
"width": 40,
"height": 40
},
"_N$startAxis": 0,
"_N$paddingLeft": 0,
"_N$paddingRight": 0,
"_N$paddingTop": 0,
"_N$paddingBottom": 0,
"_N$spacingX": 0,
"_N$spacingY": 0,
"_N$verticalDirection": 1,
"_N$horizontalDirection": 0,
"_N$affectedByScale": false,
"_id": "58UJyIFoBCB7aBzEf896AG"
},
{
"__type__": "cc.Mask",
"_name": "",
"_objFlags": 0,
...
...
@@ -1811,22 +1848,22 @@
},
"_children": [
{
"__id__": 4
1
"__id__": 4
2
},
{
"__id__": 4
4
"__id__": 4
5
},
{
"__id__": 4
7
"__id__": 4
8
},
{
"__id__": 5
0
"__id__": 5
1
}
],
"_active": false,
"_components": [
{
"__id__": 5
3
"__id__": 5
4
}
],
"_prefab": null,
...
...
@@ -1882,16 +1919,16 @@
"_name": "New Sprite(Splash)",
"_objFlags": 0,
"_parent": {
"__id__": 4
0
"__id__": 4
1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
2
"__id__": 4
3
},
{
"__id__": 4
3
"__id__": 4
4
}
],
"_prefab": null,
...
...
@@ -1947,7 +1984,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
1
"__id__": 4
2
},
"_enabled": true,
"_materials": [
...
...
@@ -1979,7 +2016,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
1
"__id__": 4
2
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -2006,16 +2043,16 @@
"_name": "Title",
"_objFlags": 0,
"_parent": {
"__id__": 4
0
"__id__": 4
1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
5
"__id__": 4
6
},
{
"__id__": 4
6
"__id__": 4
7
}
],
"_prefab": null,
...
...
@@ -2071,7 +2108,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
4
"__id__": 4
5
},
"_enabled": true,
"_materials": [
...
...
@@ -2101,7 +2138,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
4
"__id__": 4
5
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -2128,16 +2165,16 @@
"_name": "Desc",
"_objFlags": 0,
"_parent": {
"__id__": 4
0
"__id__": 4
1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
8
"__id__": 4
9
},
{
"__id__":
49
"__id__":
50
}
],
"_prefab": null,
...
...
@@ -2193,7 +2230,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
7
"__id__": 4
8
},
"_enabled": true,
"_materials": [
...
...
@@ -2223,7 +2260,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
7
"__id__": 4
8
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -2250,16 +2287,16 @@
"_name": "New Sprite(Splash)",
"_objFlags": 0,
"_parent": {
"__id__": 4
0
"__id__": 4
1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 5
1
"__id__": 5
2
},
{
"__id__": 5
2
"__id__": 5
3
}
],
"_prefab": null,
...
...
@@ -2315,7 +2352,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
0
"__id__": 5
1
},
"_enabled": true,
"_materials": [
...
...
@@ -2347,7 +2384,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
0
"__id__": 5
1
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -2374,7 +2411,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
0
"__id__": 4
1
},
"_enabled": true,
"_materials": [
...
...
@@ -2412,10 +2449,10 @@
"_active": true,
"_components": [
{
"__id__": 5
5
"__id__": 5
6
},
{
"__id__": 6
1
"__id__": 6
2
}
],
"_prefab": null,
...
...
@@ -2471,14 +2508,14 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
4
"__id__": 5
5
},
"_enabled": true,
"videoPlayer1": null,
"currentTime": null,
"totalTime": null,
"loadingIcon": {
"__id__": 5
6
"__id__": 5
7
},
"now": 0,
"duration": 0,
...
...
@@ -2492,16 +2529,16 @@
"_name": "LoadingIcon",
"_objFlags": 0,
"_parent": {
"__id__": 5
7
"__id__": 5
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
59
"__id__":
60
},
{
"__id__": 6
0
"__id__": 6
1
}
],
"_prefab": null,
...
...
@@ -2561,13 +2598,13 @@
},
"_children": [
{
"__id__": 5
6
"__id__": 5
7
}
],
"_active": true,
"_components": [
{
"__id__": 5
8
"__id__": 5
9
}
],
"_prefab": null,
...
...
@@ -2623,7 +2660,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
7
"__id__": 5
8
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -2650,7 +2687,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
6
"__id__": 5
7
},
"_enabled": true,
"_materials": [
...
...
@@ -2682,7 +2719,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
6
"__id__": 5
7
},
"_enabled": true,
"_defaultClip": {
...
...
@@ -2701,7 +2738,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
4
"__id__": 5
5
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -2734,16 +2771,16 @@
},
"_children": [
{
"__id__": 6
3
"__id__": 6
4
},
{
"__id__": 6
5
"__id__": 6
6
}
],
"_active": true,
"_components": [
{
"__id__": 6
7
"__id__": 6
8
}
],
"_prefab": null,
...
...
@@ -2811,13 +2848,13 @@
"_name": "GraphicsLine",
"_objFlags": 0,
"_parent": {
"__id__": 6
2
"__id__": 6
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 6
4
"__id__": 6
5
}
],
"_prefab": null,
...
...
@@ -2885,7 +2922,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
3
"__id__": 6
4
},
"_enabled": true,
"_materials": [
...
...
@@ -2918,11 +2955,11 @@
"_name": "EpisodeListWrapper",
"_objFlags": 0,
"_parent": {
"__id__": 6
2
"__id__": 6
3
},
"_children": [
{
"__id__": 6
6
"__id__": 6
7
}
],
"_active": true,
...
...
@@ -2938,7 +2975,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 12
30
,
"width": 12
16
,
"height": 80
},
"_anchorPoint": {
...
...
@@ -2962,7 +2999,7 @@
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
-14
,
0
,
0,
0,
0,
...
...
@@ -2992,7 +3029,7 @@
"_name": "EpisodeList",
"_objFlags": 0,
"_parent": {
"__id__": 6
5
"__id__": 6
6
},
"_children": [],
"_active": true,
...
...
@@ -3032,7 +3069,7 @@
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
14
,
0
,
0,
0,
0,
...
...
@@ -3062,7 +3099,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
2
"__id__": 6
3
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -3093,19 +3130,19 @@
},
"_children": [
{
"__id__":
69
"__id__":
70
},
{
"__id__": 7
2
"__id__": 7
3
},
{
"__id__": 7
4
"__id__": 7
5
}
],
"_active": true,
"_components": [
{
"__id__": 7
6
"__id__": 7
7
}
],
"_prefab": null,
...
...
@@ -3173,17 +3210,17 @@
"_name": "NaviListWrapper",
"_objFlags": 0,
"_parent": {
"__id__": 6
8
"__id__": 6
9
},
"_children": [
{
"__id__": 7
0
"__id__": 7
1
}
],
"_active": true,
"_components": [
{
"__id__": 7
1
"__id__": 7
2
}
],
"_prefab": null,
...
...
@@ -3251,7 +3288,7 @@
"_name": "NaviList",
"_objFlags": 0,
"_parent": {
"__id__":
69
"__id__":
70
},
"_children": [],
"_active": true,
...
...
@@ -3321,7 +3358,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
69
"__id__":
70
},
"_enabled": true,
"_materials": [
...
...
@@ -3341,13 +3378,13 @@
"_name": "LeftIcon",
"_objFlags": 0,
"_parent": {
"__id__": 6
8
"__id__": 6
9
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 7
3
"__id__": 7
4
}
],
"_prefab": null,
...
...
@@ -3415,7 +3452,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
2
"__id__": 7
3
},
"_enabled": true,
"_materials": [],
...
...
@@ -3441,13 +3478,13 @@
"_name": "RightIcon",
"_objFlags": 0,
"_parent": {
"__id__": 6
8
"__id__": 6
9
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 7
5
"__id__": 7
6
}
],
"_prefab": null,
...
...
@@ -3515,7 +3552,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
4
"__id__": 7
5
},
"_enabled": true,
"_materials": [],
...
...
@@ -3541,7 +3578,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
8
"__id__": 6
9
},
"_enabled": true,
"alignMode": 1,
...
...
assets/Script/gameCategory.js
View file @
31fc8e3
...
...
@@ -31,7 +31,15 @@ cc.Class({
this
.
_bIsDataListMoving
=
false
;
this
.
_bInitCategoryListSuccess
=
false
;
if
(
this
.
_cApplication
.
getBackStatus
())
{
let
aSceneParameter
=
this
.
_cApplication
.
getSceneParameter
();
cc
.
log
(
"gameDetail->aSceneParameter..."
+
JSON
.
stringify
(
aSceneParameter
));
if
(
aSceneParameter
.
length
)
{
this
.
_oSceneContext
.
_iCurrentLeftIndex
=
aSceneParameter
[
aSceneParameter
.
length
-
1
].
currentIndex
||
0
;
}
else
if
(
aSceneParameter
)
{
this
.
_oSceneContext
.
_iCurrentLeftIndex
=
aSceneParameter
.
currentIndex
||
0
;
}
if
(
this
.
_cApplication
.
getBackStatus
())
{
//返回值放到下方,否则恢复的数据是首页带回来的数值
//恢复上下文 包括
//光标位置 focusPath
let
oSceneContext
=
this
.
_cApplication
.
popSceneContext
();
...
...
@@ -41,14 +49,7 @@ cc.Class({
}
this
.
_cApplication
.
setBackStatus
(
false
);
}
let
aSceneParameter
=
this
.
_cApplication
.
getSceneParameter
();
cc
.
log
(
"gameDetail->aSceneParameter..."
+
JSON
.
stringify
(
aSceneParameter
));
if
(
aSceneParameter
.
length
)
{
this
.
_oSceneContext
.
_iCurrentLeftIndex
=
aSceneParameter
[
aSceneParameter
.
length
-
1
].
currentIndex
||
0
;
}
else
if
(
aSceneParameter
)
{
this
.
_oSceneContext
.
_iCurrentLeftIndex
=
aSceneParameter
.
currentIndex
||
0
;
}
cc
.
log
(
"back status: "
+
this
.
_oSceneContext
.
_iCurrentLeftIndex
);
this
.
_nodeTypeListWrapper
=
cc
.
find
(
"TypeListArea/TypeListWrapper"
,
this
.
node
);
this
.
_nodeTypeList
=
cc
.
find
(
"TypeList"
,
this
.
_nodeTypeListWrapper
);
...
...
assets/Script/videoDetail.js
View file @
31fc8e3
...
...
@@ -101,14 +101,18 @@ cc.Class({
if
(
i
>=
oJSONResult
.
resultSet
.
length
)
{
//数据较少时
continue
;
}
let
nodeEpisodeCell
=
cc
.
instantiate
(
this
.
PFB_EPISODE
);
nodeEpisodeCell
.
x
=
nodeEpisodeCell
.
width
/
2
+
(
i
)
*
(
nodeEpisodeCell
.
width
+
20
);
cc
.
find
(
"EpisodeNum/Text"
,
nodeEpisodeCell
).
getComponent
(
cc
.
Label
).
string
=
oJSONResult
.
resultSet
[
i
].
name
;
this
.
_nodeEpisodeList
.
addChild
(
nodeEpisodeCell
,
10
,
"EpisodeListCell"
+
i
);
let
nodeEpisodeCell
=
cc
.
find
(
"EpisodeListCell"
+
i
,
this
.
_nodeEpisodeList
);
if
(
nodeEpisodeCell
==
null
)
{
nodeEpisodeCell
=
cc
.
instantiate
(
this
.
PFB_EPISODE
);
this
.
_nodeEpisodeList
.
addChild
(
nodeEpisodeCell
,
10
,
"EpisodeListCell"
+
i
);
let
fiEpisodeBlock
=
nodeEpisodeCell
.
addComponent
(
FocusInfo
);
fiEpisodeBlock
.
init
(
''
,
true
,
null
,
null
,
1.0
);
this
.
_aFocusTargets
[
0
][
'episode_list_cell_'
+
i
]
=
nodeEpisodeCell
;
}
let
fiEpisodeBlock
=
nodeEpisodeCell
.
addComponent
(
FocusInfo
);
fiEpisodeBlock
.
init
(
''
,
true
,
null
,
null
,
1.0
);
this
.
_aFocusTargets
[
0
][
'episode_list_cell_'
+
i
]
=
nodeEpisodeCell
;
nodeEpisodeCell
.
x
=
nodeEpisodeCell
.
width
/
2
+
(
i
)
*
(
nodeEpisodeCell
.
width
+
12
);
cc
.
find
(
"EpisodeNum/Text"
,
nodeEpisodeCell
).
getComponent
(
cc
.
Label
).
string
=
oJSONResult
.
resultSet
[
i
].
name
;
}
if
(
!
this
.
_bIsNaviDataInit
)
{
...
...
@@ -124,6 +128,7 @@ cc.Class({
},
this
,
"uuid"
);
},
//1-20、21-40、41-60
initNaviList
:
function
()
{
//剧集分类
let
sum
=
this
.
_oEpisode
.
count
/
20
;
...
...
@@ -135,21 +140,21 @@ cc.Class({
continue
;
}
nodeNaviListCell
=
cc
.
instantiate
(
this
.
PFB_NAVI
);
nodeNaviListCell
.
x
=
nodeNaviListCell
.
width
/
2
+
(
i
-
1
)
*
(
nodeNaviListCell
.
width
+
23
);
nodeNaviListCell
.
x
=
nodeNaviListCell
.
width
/
2
+
(
i
-
1
)
*
(
nodeNaviListCell
.
width
+
12
);
i
==
Math
.
ceil
(
sum
)
?
nodeNaviListCell
.
getChildByName
(
'Text'
).
getComponent
(
cc
.
Label
).
string
=
(
20
*
i
-
19
)
+
"-"
+
this
.
_oEpisode
.
count
:
nodeNaviListCell
.
getChildByName
(
'Text'
).
getComponent
(
cc
.
Label
).
string
=
(
20
*
i
-
19
)
+
"-"
+
20
*
i
;
//TODO:最后显示应该是41-52而不是41-60
this
.
_nodeNaviList
.
addChild
(
nodeNaviListCell
,
10
,
"NaviListCell"
+
i
);
cc
.
loader
.
loadRes
(
'VideoDetail/navi_bg'
,
cc
.
Texture2D
,
function
(
err
,
texture
)
{
let
spriteFrame
=
new
cc
.
SpriteFrame
();
if
(
i
==
1
)
{
cc
.
find
(
'Text'
,
nodeNaviListCell
).
color
=
new
cc
.
Color
(
112
,
69
,
61
);
spriteFrame
.
setTexture
(
texture
,
cc
.
rect
(
0
,
42
,
110
,
42
));
}
else
{
spriteFrame
.
setTexture
(
texture
,
cc
.
rect
(
0
,
0
,
110
,
42
));
}
nodeNaviListCell
.
getChildByName
(
'Bg'
).
getComponent
(
cc
.
Sprite
).
spriteFrame
=
spriteFrame
;
spriteFrame
.
_calculateUV
();
});
//
cc.loader.loadRes('VideoDetail/navi_bg', cc.Texture2D, function (err, texture) {
//
let spriteFrame = new cc.SpriteFrame();
//
if (i == 1) {
//
cc.find('Text', nodeNaviListCell).color = new cc.Color(112, 69, 61);
//
spriteFrame.setTexture(texture, cc.rect(0, 42, 110, 42));
//
} else {
//
spriteFrame.setTexture(texture, cc.rect(0, 0, 110, 42));
//
}
//
nodeNaviListCell.getChildByName('Bg').getComponent(cc.Sprite).spriteFrame = spriteFrame;
//
spriteFrame._calculateUV();
//
});
//准备焦点坐标
let
fiNaviBlock
=
nodeNaviListCell
.
addComponent
(
FocusInfo
);
fiNaviBlock
.
init
(
''
,
true
,
null
,
null
,
1.0
);
...
...
@@ -308,7 +313,7 @@ cc.Class({
}
if
(
fiFocusTarget
&&
0
==
fiFocusTarget
.
node
.
name
.
indexOf
(
"EpisodeListCell"
))
{
if
(
fiFocusTarget
.
node
.
x
-
fiFocusTarget
.
node
.
width
/
2
+
this
.
_nodeEpisodeList
.
x
>=
this
.
_nodeEpisodeListWrapper
.
width
)
{
if
(
fiFocusTarget
.
node
.
x
+
fiFocusTarget
.
node
.
width
/
2
+
this
.
_nodeEpisodeList
.
x
>=
this
.
_nodeEpisodeListWrapper
.
width
)
{
oScrollParameter
=
this
.
_nodeEpisodeList
.
getComponent
(
TVScrollParameter
);
oScrollParameter
.
setHasRelation
(
true
);
oScrollParameter
.
setStep
((
fiFocusTarget
.
node
.
x
+
fiFocusTarget
.
node
.
width
/
2
+
this
.
_nodeEpisodeList
.
x
)
-
this
.
_nodeEpisodeListWrapper
.
width
+
20
);
...
...
@@ -318,7 +323,7 @@ cc.Class({
if
(
fiFocusTarget
.
node
.
x
+
this
.
_nodeEpisodeList
.
x
<
0
)
{
oScrollParameter
=
this
.
_nodeEpisodeList
.
getComponent
(
TVScrollParameter
);
oScrollParameter
.
setHasRelation
(
true
);
oScrollParameter
.
setStep
(
-
fiFocusTarget
.
node
.
x
+
fiFocusTarget
.
node
.
width
/
2
-
this
.
_nodeEpisodeList
.
x
+
16
);
oScrollParameter
.
setStep
(
-
fiFocusTarget
.
node
.
x
+
fiFocusTarget
.
node
.
width
/
2
-
this
.
_nodeEpisodeList
.
x
);
oScrollParameter
.
setTargetPosition
(
this
.
_nodeEpisodeList
.
x
+
oScrollParameter
.
getStep
())
// this._oSceneContext._nodeNaviListX = this._nodeEpisodeList.x + oScrollParameter.getStep();
}
...
...
@@ -417,11 +422,20 @@ cc.Class({
if
(
0
==
fiFrom
.
node
.
getName
().
indexOf
(
'NaviListCell'
)
&&
0
==
fiTo
.
node
.
getName
().
indexOf
(
'NaviListCell'
))
{
//剧集分类1-20.21-40...
cc
.
find
(
'Text'
,
fiFrom
.
node
).
color
=
new
cc
.
Color
(
255
,
255
,
255
);
// fiFrom.node.getChildByName('Bg').getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, fiFrom.node.getChildByName('Bg').width, fiFrom.node.getChildByName('Bg').height));
cc
.
loader
.
loadRes
(
'VideoDetail/navi_bg'
,
cc
.
Texture2D
,
function
(
err
,
texture
)
{
fiFrom
.
node
.
getChildByName
(
'Bg'
).
getComponent
(
cc
.
Sprite
).
spriteFrame
=
new
cc
.
SpriteFrame
(
texture
,
cc
.
rect
(
0
,
0
,
fiFrom
.
node
.
getChildByName
(
'Bg'
).
width
,
fiFrom
.
node
.
getChildByName
(
'Bg'
).
height
));
});
//
cc.loader.loadRes('VideoDetail/navi_bg', cc.Texture2D, function (err, texture) {
//
fiFrom.node.getChildByName('Bg').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, fiFrom.node.getChildByName('Bg').width, fiFrom.node.getChildByName('Bg').height));
//
});
}
// if (0 == fiFrom.node.getName().indexOf('EpisodeListCell')) { //剧集分类1-20.21-40...
// fiFrom.node.width = 104;
// // cc.find('Text', fiTo.node).color = new cc.Color(255, 204, 1);
// // fiTo.node.getChildByName('Bg').getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, fiTo.node.getChildByName('Bg').height, fiTo.node.getChildByName('Bg').width, fiTo.node.getChildByName('Bg').height));
// // cc.loader.loadRes('VideoDetail/navi_bg', cc.Texture2D, function (err, texture) {
// // fiTo.node.getChildByName('Bg').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, fiTo.node.getChildByName('Bg').height, fiTo.node.getChildByName('Bg').width, fiTo.node.getChildByName('Bg').height));
// // });
// }
},
onAfterFocusChange
:
function
(
event
)
{
...
...
@@ -456,16 +470,25 @@ cc.Class({
this
.
_oSceneContext
.
currentPage
=
1
;
//页面恢复
cc
.
find
(
'Text'
,
fiTo
.
node
).
color
=
new
cc
.
Color
(
112
,
69
,
6
1
);
cc
.
find
(
'Text'
,
fiTo
.
node
).
color
=
new
cc
.
Color
(
255
,
204
,
1
);
// fiTo.node.getChildByName('Bg').getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, fiTo.node.getChildByName('Bg').height, fiTo.node.getChildByName('Bg').width, fiTo.node.getChildByName('Bg').height));
cc
.
loader
.
loadRes
(
'VideoDetail/navi_bg'
,
cc
.
Texture2D
,
function
(
err
,
texture
)
{
fiTo
.
node
.
getChildByName
(
'Bg'
).
getComponent
(
cc
.
Sprite
).
spriteFrame
=
new
cc
.
SpriteFrame
(
texture
,
cc
.
rect
(
0
,
fiTo
.
node
.
getChildByName
(
'Bg'
).
height
,
fiTo
.
node
.
getChildByName
(
'Bg'
).
width
,
fiTo
.
node
.
getChildByName
(
'Bg'
).
height
));
});
//
cc.loader.loadRes('VideoDetail/navi_bg', cc.Texture2D, function (err, texture) {
//
fiTo.node.getChildByName('Bg').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, fiTo.node.getChildByName('Bg').height, fiTo.node.getChildByName('Bg').width, fiTo.node.getChildByName('Bg').height));
//
});
let
index
=
fiTo
.
node
.
name
.
replace
(
'NaviListCell'
,
''
);
this
.
_iCurrentNaviNumLoc
=
index
;
this
.
_oSceneContext
.
requestedStart
=
index
*
20
-
20
;
this
.
getGatherDetailList
();
}
// if (0 == fiTo.node.getName().indexOf('EpisodeListCell')) { //剧集分类1-20.21-40...
// fiTo.node.width = 378;
// // cc.find('Text', fiTo.node).color = new cc.Color(255, 204, 1);
// // fiTo.node.getChildByName('Bg').getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, fiTo.node.getChildByName('Bg').height, fiTo.node.getChildByName('Bg').width, fiTo.node.getChildByName('Bg').height));
// // cc.loader.loadRes('VideoDetail/navi_bg', cc.Texture2D, function (err, texture) {
// // fiTo.node.getChildByName('Bg').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, fiTo.node.getChildByName('Bg').height, fiTo.node.getChildByName('Bg').width, fiTo.node.getChildByName('Bg').height));
// // });
// }
},
doCurrentFocusTVLinkAction
:
function
(
strAction
)
{
...
...
Please
register
or
sign in
to post a comment