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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
5 deletions
assets/Scene/sceneHistoryAndCollect.fire
assets/Script/historyAndCollect.js
assets/Script/listCell/pfbCommonCell.js
assets/Scene/sceneHistoryAndCollect.fire
View file @
f5be29d
This diff is collapsed.
Click to expand it.
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) {
...
...
@@ -51,7 +52,7 @@ cc.Class({
}
},
function
()
{
},
this
);
...
...
Please
register
or
sign in
to post a comment