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
f5be29dc
...
f5be29dc709a29dbaa84bce8b26a8cb31b921fa3
authored
2020-04-07 14:14:24 +0800
by
金学艇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.准备集成福建相关SDK
1 parent
21afd251
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
288 additions
and
104 deletions
assets/Scene/sceneHistoryAndCollect.fire
assets/Script/historyAndCollect.js
assets/Script/listCell/pfbCommonCell.js
assets/Scene/sceneHistoryAndCollect.fire
View file @
f5be29d
...
...
@@ -84,22 +84,25 @@
"__id__": 13
},
{
"__id__":
20
"__id__":
16
},
{
"__id__":
45
"__id__":
23
},
{
"__id__": 48
},
{
"__id__": 51
}
],
"_active": true,
"_components": [
{
"__id__": 5
0
"__id__": 5
3
},
{
"__id__": 5
1
"__id__": 5
4
}
],
"_prefab": null,
...
...
@@ -467,13 +470,13 @@
},
{
"__type__": "cc.Node",
"_name": "
TitleLabel
",
"_name": "
EmptyBtn
",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active":
fals
e,
"_active":
tru
e,
"_components": [
{
"__id__": 11
...
...
@@ -486,15 +489,15 @@
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 2
46
,
"g": 25
4
,
"r": 2
55
,
"g": 25
5
,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width":
60
,
"height":
37.8
"width":
156
,
"height":
84
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -505,8 +508,8 @@
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
-530
,
317.1000061035156
,
368
,
290
,
0,
0,
0,
...
...
@@ -528,10 +531,10 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "9
5N43/51NONrtOFqzxEAah
"
"_id": "9
2hXMvPEtGaq1p63YOnMkZ
"
},
{
"__type__": "cc.
Label
",
"__type__": "cc.
Sprite
",
"_name": "",
"_objFlags": 0,
"node": {
...
...
@@ -543,22 +546,24 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "分类",
"_N$string": "分类",
"_fontSize": 30,
"_lineHeight": 30,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "ackt/J+XZNZp/rJVq2csxX"
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "40d1bd90-26f0-463d-b61f-12ccfa857e02"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "b5yFIqZSdGyLGm9BRQtEbM"
},
{
"__type__": "cc.Widget",
...
...
@@ -571,9 +576,133 @@
"alignMode": 1,
"_target": null,
"_alignFlags": 9,
"_left": 80,
"_left": 930,
"_right": 0,
"_top": 28,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "e2OIC6fVxCw6p+mfsAArq4"
},
{
"__type__": "cc.Node",
"_name": "ExitBtn",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 14
},
{
"__id__": 15
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 156,
"height": 84
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
534,
290,
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": "5fuvr6hQNBfISGxc21Osz+"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "8e2a3bec-3d1f-4294-a693-1c758345cc79"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "a76cLFqg1MB6CJT+hOvzEP"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 9,
"_left": 1096,
"_right": 0,
"_top": 2
4
,
"_top": 2
8
,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
...
...
@@ -585,7 +714,7 @@
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "
51VlCee69C7I5r1KIUrxz0
"
"_id": "
8eyZejQLhLUJyrGmxsla1B
"
},
{
"__type__": "cc.Node",
...
...
@@ -596,16 +725,16 @@
},
"_children": [
{
"__id__": 1
4
"__id__": 1
7
},
{
"__id__": 1
6
"__id__": 1
9
}
],
"_active": true,
"_components": [
{
"__id__":
19
"__id__":
22
}
],
"_prefab": null,
...
...
@@ -673,13 +802,13 @@
"_name": "Bg",
"_objFlags": 0,
"_parent": {
"__id__": 1
3
"__id__": 1
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
5
"__id__": 1
8
}
],
"_prefab": null,
...
...
@@ -747,7 +876,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
4
"__id__": 1
7
},
"_enabled": true,
"_materials": [
...
...
@@ -777,17 +906,17 @@
"_name": "TypeListWrapper",
"_objFlags": 0,
"_parent": {
"__id__": 1
3
"__id__": 1
6
},
"_children": [
{
"__id__":
17
"__id__":
20
}
],
"_active": true,
"_components": [
{
"__id__":
18
"__id__":
21
}
],
"_prefab": null,
...
...
@@ -855,7 +984,7 @@
"_name": "TypeList",
"_objFlags": 0,
"_parent": {
"__id__": 1
6
"__id__": 1
9
},
"_children": [],
"_active": true,
...
...
@@ -925,7 +1054,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
6
"__id__": 1
9
},
"_enabled": true,
"_materials": [
...
...
@@ -945,7 +1074,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
3
"__id__": 1
6
},
"_enabled": true,
"alignMode": 2,
...
...
@@ -976,16 +1105,16 @@
},
"_children": [
{
"__id__": 2
1
"__id__": 2
4
},
{
"__id__": 2
4
"__id__": 2
7
}
],
"_active": true,
"_components": [
{
"__id__": 4
4
"__id__": 4
7
}
],
"_prefab": null,
...
...
@@ -1053,17 +1182,17 @@
"_name": "DataContainerMask",
"_objFlags": 0,
"_parent": {
"__id__": 2
0
"__id__": 2
3
},
"_children": [
{
"__id__": 2
2
"__id__": 2
5
}
],
"_active": true,
"_components": [
{
"__id__": 2
3
"__id__": 2
6
}
],
"_prefab": null,
...
...
@@ -1131,7 +1260,7 @@
"_name": "DataContainer",
"_objFlags": 0,
"_parent": {
"__id__": 2
1
"__id__": 2
4
},
"_children": [],
"_active": true,
...
...
@@ -1201,7 +1330,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
1
"__id__": 2
4
},
"_enabled": true,
"_materials": [
...
...
@@ -1221,23 +1350,23 @@
"_name": "ScrollBarContainer",
"_objFlags": 0,
"_parent": {
"__id__": 2
0
"__id__": 2
3
},
"_children": [
{
"__id__": 2
5
"__id__": 2
8
},
{
"__id__":
27
"__id__":
30
}
],
"_active": false,
"_components": [
{
"__id__": 4
2
"__id__": 4
5
},
{
"__id__": 4
3
"__id__": 4
6
}
],
"_prefab": null,
...
...
@@ -1305,13 +1434,13 @@
"_name": "ScrollBarHight",
"_objFlags": 0,
"_parent": {
"__id__": 2
4
"__id__": 2
7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 2
6
"__id__": 2
9
}
],
"_prefab": null,
...
...
@@ -1379,7 +1508,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
5
"__id__": 2
8
},
"_enabled": true,
"_materials": [],
...
...
@@ -1405,20 +1534,20 @@
"_name": "ScrollBarShadow",
"_objFlags": 0,
"_parent": {
"__id__": 2
4
"__id__": 2
7
},
"_children": [
{
"__id__":
28
"__id__":
31
}
],
"_active": true,
"_components": [
{
"__id__": 4
0
"__id__": 4
3
},
{
"__id__": 4
1
"__id__": 4
4
}
],
"_prefab": null,
...
...
@@ -1486,26 +1615,26 @@
"_name": "ScrollBarBlock",
"_objFlags": 0,
"_parent": {
"__id__":
27
"__id__":
30
},
"_children": [
{
"__id__": 29
},
{
"__id__": 32
},
{
"__id__": 35
},
{
"__id__": 38
}
],
"_active": true,
"_components": [
{
"__id__":
38
"__id__":
41
},
{
"__id__":
39
"__id__":
42
}
],
"_prefab": null,
...
...
@@ -1573,16 +1702,16 @@
"_name": "AU",
"_objFlags": 0,
"_parent": {
"__id__":
28
"__id__":
31
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
0
"__id__": 3
3
},
{
"__id__": 3
1
"__id__": 3
4
}
],
"_prefab": null,
...
...
@@ -1650,7 +1779,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
29
"__id__":
32
},
"_enabled": true,
"_materials": [],
...
...
@@ -1676,7 +1805,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
29
"__id__":
32
},
"_enabled": true,
"alignMode": 0,
...
...
@@ -1703,16 +1832,16 @@
"_name": "AD",
"_objFlags": 0,
"_parent": {
"__id__":
28
"__id__":
31
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
3
"__id__": 3
6
},
{
"__id__": 3
4
"__id__": 3
7
}
],
"_prefab": null,
...
...
@@ -1780,7 +1909,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
2
"__id__": 3
5
},
"_enabled": true,
"_materials": [],
...
...
@@ -1806,7 +1935,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
2
"__id__": 3
5
},
"_enabled": true,
"alignMode": 0,
...
...
@@ -1833,16 +1962,16 @@
"_name": "Page",
"_objFlags": 0,
"_parent": {
"__id__":
28
"__id__":
31
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
6
"__id__": 3
9
},
{
"__id__":
37
"__id__":
40
}
],
"_prefab": null,
...
...
@@ -1910,7 +2039,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
5
"__id__": 3
8
},
"_enabled": true,
"_fontFamily": "Arial",
...
...
@@ -1930,7 +2059,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
5
"__id__": 3
8
},
"_enabled": true,
"alignMode": 0,
...
...
@@ -1957,7 +2086,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
28
"__id__":
31
},
"_enabled": true,
"_materials": [],
...
...
@@ -1983,12 +2112,12 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
28
"__id__":
31
},
"_enabled": true,
"alignMode": 2,
"_target": {
"__id__":
27
"__id__":
30
},
"_alignFlags": 4,
"_left": -4,
...
...
@@ -2012,7 +2141,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
27
"__id__":
30
},
"_enabled": true,
"_materials": [],
...
...
@@ -2038,7 +2167,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
27
"__id__":
30
},
"_enabled": true,
"alignMode": 2,
...
...
@@ -2065,7 +2194,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
4
"__id__": 2
7
},
"_enabled": true,
"alignMode": 0,
...
...
@@ -2092,7 +2221,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
4
"__id__": 2
7
},
"_enabled": false,
"_materials": [],
...
...
@@ -2108,7 +2237,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
0
"__id__": 2
3
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -2141,10 +2270,10 @@
"_active": true,
"_components": [
{
"__id__": 4
6
"__id__": 4
9
},
{
"__id__":
47
"__id__":
50
}
],
"_prefab": null,
...
...
@@ -2212,7 +2341,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
5
"__id__": 4
8
},
"_enabled": true,
"_materials": [
...
...
@@ -2242,7 +2371,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
5
"__id__": 4
8
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -2275,7 +2404,7 @@
"_active": true,
"_components": [
{
"__id__":
49
"__id__":
52
}
],
"_prefab": null,
...
...
@@ -2343,7 +2472,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
48
"__id__":
51
},
"_enabled": true,
"_materials": [
...
...
assets/Script/historyAndCollect.js
View file @
f5be29d
...
...
@@ -64,6 +64,13 @@ cc.Class({
this
.
getNavList
();
//获取导航栏信息
},
start
:
function
()
{
let
emptyBtn
=
cc
.
find
(
"EmptyBtn"
,
this
.
node
);
let
exitBtn
=
cc
.
find
(
"ExitBtn"
,
this
.
node
);
emptyBtn
.
getComponent
(
cc
.
Sprite
).
spriteFrame
.
setRect
(
cc
.
rect
(
0
,
0
,
emptyBtn
.
width
,
emptyBtn
.
height
));
exitBtn
.
getComponent
(
cc
.
Sprite
).
spriteFrame
.
setRect
(
cc
.
rect
(
0
,
0
,
exitBtn
.
width
,
exitBtn
.
height
));
},
getNavList
:
function
()
{
var
self
=
this
;
this
.
_nodeTypeList
.
y
=
0
;
...
...
@@ -153,7 +160,8 @@ cc.Class({
var
self
=
this
;
try
{
if
(
this
.
_oSceneContext
.
_iCurrentLeftIndex
==
0
&&
(
this
.
_oInit
[
this
.
_oSceneContext
.
_iCurrentLeftIndex
]
==
null
||
this
.
_oInit
[
this
.
_oSceneContext
.
_iCurrentLeftIndex
].
resultSet
==
0
))
{
&&
(
this
.
_oInit
[
this
.
_oSceneContext
.
_iCurrentLeftIndex
]
==
null
||
this
.
_oInit
[
this
.
_oSceneContext
.
_iCurrentLeftIndex
].
resultSet
==
0
))
{
this
.
_oInit
[
this
.
_oSceneContext
.
_iCurrentLeftIndex
]
=
cc
.
sys
.
localStorage
.
getItem
(
"gameHistoryList"
);
if
(
this
.
_oInit
[
this
.
_oSceneContext
.
_iCurrentLeftIndex
]
==
null
)
{
let
oData
=
{};
...
...
@@ -320,6 +328,15 @@ cc.Class({
//初始化焦点框
initFocus
:
function
()
{
let
fiBtnEmpty
=
cc
.
find
(
"EmptyBtn"
,
this
.
node
).
addComponent
(
FocusInfo
);
//
fiBtnEmpty
.
init
(
''
,
true
,
null
,
null
,
1.0
);
this
.
_aFocusTargets
[
0
][
'node_button_empty'
]
=
cc
.
find
(
"EmptyBtn"
,
this
.
node
);
let
fiBtnExit
=
cc
.
find
(
"ExitBtn"
,
this
.
node
).
addComponent
(
FocusInfo
);
//
fiBtnExit
.
init
(
''
,
true
,
null
,
null
,
1.0
);
this
.
_aFocusTargets
[
0
][
'node_button_exit'
]
=
cc
.
find
(
"ExitBtn"
,
this
.
node
);
var
nodeInitFocus
=
cc
.
find
(
this
.
_oSceneContext
.
focusPath
,
this
.
node
);
cc
.
log
(
"初始化 "
+
nodeInitFocus
.
name
);
var
nodeFocus
=
new
cc
.
Node
(
'nodeFocus'
);
...
...
@@ -368,10 +385,10 @@ cc.Class({
},
checkFocusTarget
:
function
(
fiFocusTarget
,
oScrollParameter
,
Direct
)
{
this
.
_cFocus
.
show
();
//
this._cFocus.show();
// cc.log("目标节点:" + fiFocusTarget.node.x);
if
(
fiFocusTarget
&&
0
==
fiFocusTarget
.
node
.
name
.
indexOf
(
"topNavi"
))
{
this
.
_cFocus
.
hide
();
//
this._cFocus.hide();
if
(
0
!=
this
.
_fiCurrentFocus
.
node
.
name
.
indexOf
(
"topNavi"
))
{
//如果不是TypeList之间跳转,则哪里来回哪里去
fiFocusTarget
=
cc
.
find
(
"topNavi"
+
this
.
_oSceneContext
.
_iCurrentLeftIndex
,
this
.
_nodeTypeList
).
getComponent
(
FocusInfo
);
}
...
...
@@ -380,7 +397,7 @@ cc.Class({
//打补丁,焦点在TypeList向下滑动,会找到category的焦点,禁掉这种
if
(
0
==
this
.
_fiCurrentFocus
.
node
.
name
.
indexOf
(
"topNavi"
)
&&
0
!=
fiFocusTarget
.
node
.
name
.
indexOf
(
"topNavi"
)
&&
Direct
==
Common
.
MOVE_DIRECTION_DOWN
)
{
this
.
_cFocus
.
hide
();
//
this._cFocus.hide();
fiFocusTarget
=
null
;
}
...
...
@@ -551,6 +568,22 @@ cc.Class({
fiFrom
.
node
.
getComponent
(
ListCell
).
setUIWithoutFocus
();
}
if
(
0
==
fiFrom
.
node
.
getName
().
indexOf
(
'EmptyBtn'
))
{
// fiTo.node.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, fiTo.node.height, fiTo.node.width, fiTo.node.height));
cc
.
loader
.
loadRes
(
'HistoryAndCollect/icon_empty'
,
cc
.
Texture2D
,
function
(
err
,
texture
)
{
fiFrom
.
node
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
new
cc
.
SpriteFrame
(
texture
,
cc
.
rect
(
0
,
0
,
fiFrom
.
node
.
width
,
fiFrom
.
node
.
height
));
// spriteFrame._calculateUV();
});
}
if
(
0
==
fiFrom
.
node
.
getName
().
indexOf
(
'ExitBtn'
))
{
// fiTo.node.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, fiTo.node.height, fiTo.node.width, fiTo.node.height));
cc
.
loader
.
loadRes
(
'HistoryAndCollect/icon_exit'
,
cc
.
Texture2D
,
function
(
err
,
texture
)
{
fiFrom
.
node
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
new
cc
.
SpriteFrame
(
texture
,
cc
.
rect
(
0
,
0
,
fiFrom
.
node
.
width
,
fiFrom
.
node
.
height
));
// spriteFrame._calculateUV();
});
}
// if (0 == this._fiCurrentFocus.node.getName().indexOf('TopCell')) {
// // fiFrom.node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, fiFrom.node.width, fiFrom.node.height));
// let iIndex = fiFrom.node.name.replace("TopCell", '');
...
...
@@ -610,6 +643,27 @@ cc.Class({
fiTo
.
node
.
getComponent
(
ListCell
).
setUIWithFocus
();
}
if
(
0
==
fiTo
.
node
.
getName
().
indexOf
(
'EmptyBtn'
))
{
// fiTo.node.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, fiTo.node.height, fiTo.node.width, fiTo.node.height));
cc
.
loader
.
loadRes
(
'HistoryAndCollect/icon_empty'
,
cc
.
Texture2D
,
function
(
err
,
texture
)
{
fiTo
.
node
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
new
cc
.
SpriteFrame
(
texture
,
cc
.
rect
(
0
,
fiTo
.
node
.
height
,
fiTo
.
node
.
width
,
fiTo
.
node
.
height
));
// spriteFrame._calculateUV();
});
}
if
(
0
==
fiTo
.
node
.
getName
().
indexOf
(
'ExitBtn'
))
{
// fiTo.node.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, fiTo.node.height, fiTo.node.width, fiTo.node.height));
cc
.
loader
.
loadRes
(
'HistoryAndCollect/icon_exit'
,
cc
.
Texture2D
,
function
(
err
,
texture
)
{
fiTo
.
node
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
new
cc
.
SpriteFrame
(
texture
,
cc
.
rect
(
0
,
fiTo
.
node
.
height
,
fiTo
.
node
.
width
,
fiTo
.
node
.
height
));
// spriteFrame._calculateUV();
});
}
if
(
0
==
fiTo
.
node
.
getName
().
indexOf
(
'EmptyBtn'
)
||
0
==
fiTo
.
node
.
getName
().
indexOf
(
'ExitBtn'
)
||
0
==
fiTo
.
node
.
getName
().
indexOf
(
'topNavi'
))
{
this
.
_cFocus
.
hide
();
}
else
{
this
.
_cFocus
.
show
();
}
// if (0 == fiTo.node.getName().indexOf('TopCell')) {
// let iIndex = fiTo.node.name.replace("TopCell", '');
// // fiTo.node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, fiTo.node.height, fiTo.node.width, fiTo.node.height));
...
...
assets/Script/listCell/pfbCommonCell.js
View file @
f5be29d
...
...
@@ -21,6 +21,7 @@ cc.Class({
this
.
node
.
height
=
data
.
height
;
this
.
node
.
getChildByName
(
'Pic'
).
width
=
data
.
width
;
this
.
node
.
getChildByName
(
'Pic'
).
height
=
data
.
height
;
// this.node.getChildByName('Pic').getComponent(cc.Sprite)._sgNode.setState(1);
if
(
data
.
imageURL
)
{
var
self
=
this
;
// cc.loader.loadRes(data.imageURL, cc.Texture2D, function (err, texture) {
...
...
Please
register
or
sign in
to post a comment