Commit f5be29dc f5be29dc709a29dbaa84bce8b26a8cb31b921fa3 by 金学艇

1.准备集成福建相关SDK

1 parent 21afd251
......@@ -84,22 +84,25 @@
"__id__": 13
},
{
"__id__": 20
"__id__": 16
},
{
"__id__": 45
"__id__": 23
},
{
"__id__": 48
},
{
"__id__": 51
}
],
"_active": true,
"_components": [
{
"__id__": 50
"__id__": 53
},
{
"__id__": 51
"__id__": 54
}
],
"_prefab": null,
......@@ -467,13 +470,13 @@
},
{
"__type__": "cc.Node",
"_name": "TitleLabel",
"_name": "EmptyBtn",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 11
......@@ -486,15 +489,15 @@
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 246,
"g": 254,
"r": 255,
"g": 255,
"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": "95N43/51NONrtOFqzxEAah"
"_id": "92hXMvPEtGaq1p63YOnMkZ"
},
{
"__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": 24,
"_top": 28,
"_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__": 14
"__id__": 17
},
{
"__id__": 16
"__id__": 19
}
],
"_active": true,
"_components": [
{
"__id__": 19
"__id__": 22
}
],
"_prefab": null,
......@@ -673,13 +802,13 @@
"_name": "Bg",
"_objFlags": 0,
"_parent": {
"__id__": 13
"__id__": 16
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 15
"__id__": 18
}
],
"_prefab": null,
......@@ -747,7 +876,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
"__id__": 17
},
"_enabled": true,
"_materials": [
......@@ -777,17 +906,17 @@
"_name": "TypeListWrapper",
"_objFlags": 0,
"_parent": {
"__id__": 13
"__id__": 16
},
"_children": [
{
"__id__": 17
"__id__": 20
}
],
"_active": true,
"_components": [
{
"__id__": 18
"__id__": 21
}
],
"_prefab": null,
......@@ -855,7 +984,7 @@
"_name": "TypeList",
"_objFlags": 0,
"_parent": {
"__id__": 16
"__id__": 19
},
"_children": [],
"_active": true,
......@@ -925,7 +1054,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 16
"__id__": 19
},
"_enabled": true,
"_materials": [
......@@ -945,7 +1074,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
"__id__": 16
},
"_enabled": true,
"alignMode": 2,
......@@ -976,16 +1105,16 @@
},
"_children": [
{
"__id__": 21
"__id__": 24
},
{
"__id__": 24
"__id__": 27
}
],
"_active": true,
"_components": [
{
"__id__": 44
"__id__": 47
}
],
"_prefab": null,
......@@ -1053,17 +1182,17 @@
"_name": "DataContainerMask",
"_objFlags": 0,
"_parent": {
"__id__": 20
"__id__": 23
},
"_children": [
{
"__id__": 22
"__id__": 25
}
],
"_active": true,
"_components": [
{
"__id__": 23
"__id__": 26
}
],
"_prefab": null,
......@@ -1131,7 +1260,7 @@
"_name": "DataContainer",
"_objFlags": 0,
"_parent": {
"__id__": 21
"__id__": 24
},
"_children": [],
"_active": true,
......@@ -1201,7 +1330,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 21
"__id__": 24
},
"_enabled": true,
"_materials": [
......@@ -1221,23 +1350,23 @@
"_name": "ScrollBarContainer",
"_objFlags": 0,
"_parent": {
"__id__": 20
"__id__": 23
},
"_children": [
{
"__id__": 25
"__id__": 28
},
{
"__id__": 27
"__id__": 30
}
],
"_active": false,
"_components": [
{
"__id__": 42
"__id__": 45
},
{
"__id__": 43
"__id__": 46
}
],
"_prefab": null,
......@@ -1305,13 +1434,13 @@
"_name": "ScrollBarHight",
"_objFlags": 0,
"_parent": {
"__id__": 24
"__id__": 27
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 26
"__id__": 29
}
],
"_prefab": null,
......@@ -1379,7 +1508,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 25
"__id__": 28
},
"_enabled": true,
"_materials": [],
......@@ -1405,20 +1534,20 @@
"_name": "ScrollBarShadow",
"_objFlags": 0,
"_parent": {
"__id__": 24
"__id__": 27
},
"_children": [
{
"__id__": 28
"__id__": 31
}
],
"_active": true,
"_components": [
{
"__id__": 40
"__id__": 43
},
{
"__id__": 41
"__id__": 44
}
],
"_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__": 30
"__id__": 33
},
{
"__id__": 31
"__id__": 34
}
],
"_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__": 33
"__id__": 36
},
{
"__id__": 34
"__id__": 37
}
],
"_prefab": null,
......@@ -1780,7 +1909,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 32
"__id__": 35
},
"_enabled": true,
"_materials": [],
......@@ -1806,7 +1935,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 32
"__id__": 35
},
"_enabled": true,
"alignMode": 0,
......@@ -1833,16 +1962,16 @@
"_name": "Page",
"_objFlags": 0,
"_parent": {
"__id__": 28
"__id__": 31
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 36
"__id__": 39
},
{
"__id__": 37
"__id__": 40
}
],
"_prefab": null,
......@@ -1910,7 +2039,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 35
"__id__": 38
},
"_enabled": true,
"_fontFamily": "Arial",
......@@ -1930,7 +2059,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 35
"__id__": 38
},
"_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__": 24
"__id__": 27
},
"_enabled": true,
"alignMode": 0,
......@@ -2092,7 +2221,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 24
"__id__": 27
},
"_enabled": false,
"_materials": [],
......@@ -2108,7 +2237,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 20
"__id__": 23
},
"_enabled": true,
"alignMode": 1,
......@@ -2141,10 +2270,10 @@
"_active": true,
"_components": [
{
"__id__": 46
"__id__": 49
},
{
"__id__": 47
"__id__": 50
}
],
"_prefab": null,
......@@ -2212,7 +2341,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 45
"__id__": 48
},
"_enabled": true,
"_materials": [
......@@ -2242,7 +2371,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 45
"__id__": 48
},
"_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": [
......
......@@ -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));
......
......@@ -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) {
......