1.修改分类页
Showing
11 changed files
with
382 additions
and
346 deletions
| ... | @@ -17,7 +17,7 @@ | ... | @@ -17,7 +17,7 @@ |
| 17 | "__id__": 2 | 17 | "__id__": 2 |
| 18 | } | 18 | } |
| 19 | ], | 19 | ], |
| 20 | "_active": true, | 20 | "_active": false, |
| 21 | "_components": [], | 21 | "_components": [], |
| 22 | "_prefab": null, | 22 | "_prefab": null, |
| 23 | "_opacity": 255, | 23 | "_opacity": 255, |
| ... | @@ -189,7 +189,7 @@ | ... | @@ -189,7 +189,7 @@ |
| 189 | "array": [ | 189 | "array": [ |
| 190 | 0, | 190 | 0, |
| 191 | 0, | 191 | 0, |
| 192 | 265.0037841796875, | 192 | 271.0659484863281, |
| 193 | 0, | 193 | 0, |
| 194 | 0, | 194 | 0, |
| 195 | 0, | 195 | 0, |
| ... | @@ -643,7 +643,7 @@ | ... | @@ -643,7 +643,7 @@ |
| 643 | "__type__": "TypedArray", | 643 | "__type__": "TypedArray", |
| 644 | "ctor": "Float32Array", | 644 | "ctor": "Float32Array", |
| 645 | "array": [ | 645 | "array": [ |
| 646 | -485, | 646 | -505, |
| 647 | -43, | 647 | -43, |
| 648 | 0, | 648 | 0, |
| 649 | 0, | 649 | 0, |
| ... | @@ -951,7 +951,7 @@ | ... | @@ -951,7 +951,7 @@ |
| 951 | "alignMode": 2, | 951 | "alignMode": 2, |
| 952 | "_target": null, | 952 | "_target": null, |
| 953 | "_alignFlags": 9, | 953 | "_alignFlags": 9, |
| 954 | "_left": 30, | 954 | "_left": 10, |
| 955 | "_right": 0, | 955 | "_right": 0, |
| 956 | "_top": 128, | 956 | "_top": 128, |
| 957 | "_bottom": 0, | 957 | "_bottom": 0, |
| ... | @@ -999,7 +999,7 @@ | ... | @@ -999,7 +999,7 @@ |
| 999 | }, | 999 | }, |
| 1000 | "_contentSize": { | 1000 | "_contentSize": { |
| 1001 | "__type__": "cc.Size", | 1001 | "__type__": "cc.Size", |
| 1002 | "width": 900, | 1002 | "width": 1000, |
| 1003 | "height": 650 | 1003 | "height": 650 |
| 1004 | }, | 1004 | }, |
| 1005 | "_anchorPoint": { | 1005 | "_anchorPoint": { |
| ... | @@ -1023,7 +1023,7 @@ | ... | @@ -1023,7 +1023,7 @@ |
| 1023 | "__type__": "TypedArray", | 1023 | "__type__": "TypedArray", |
| 1024 | "ctor": "Float32Array", | 1024 | "ctor": "Float32Array", |
| 1025 | "array": [ | 1025 | "array": [ |
| 1026 | 148.5, | 1026 | 90, |
| 1027 | -35, | 1027 | -35, |
| 1028 | 0, | 1028 | 0, |
| 1029 | 0, | 1029 | 0, |
| ... | @@ -1077,7 +1077,7 @@ | ... | @@ -1077,7 +1077,7 @@ |
| 1077 | }, | 1077 | }, |
| 1078 | "_contentSize": { | 1078 | "_contentSize": { |
| 1079 | "__type__": "cc.Size", | 1079 | "__type__": "cc.Size", |
| 1080 | "width": 900, | 1080 | "width": 1020, |
| 1081 | "height": 650 | 1081 | "height": 650 |
| 1082 | }, | 1082 | }, |
| 1083 | "_anchorPoint": { | 1083 | "_anchorPoint": { |
| ... | @@ -1147,7 +1147,7 @@ | ... | @@ -1147,7 +1147,7 @@ |
| 1147 | }, | 1147 | }, |
| 1148 | "_contentSize": { | 1148 | "_contentSize": { |
| 1149 | "__type__": "cc.Size", | 1149 | "__type__": "cc.Size", |
| 1150 | "width": 900, | 1150 | "width": 1000, |
| 1151 | "height": 650 | 1151 | "height": 650 |
| 1152 | }, | 1152 | }, |
| 1153 | "_anchorPoint": { | 1153 | "_anchorPoint": { |
| ... | @@ -2114,7 +2114,7 @@ | ... | @@ -2114,7 +2114,7 @@ |
| 2114 | "alignMode": 1, | 2114 | "alignMode": 1, |
| 2115 | "_target": null, | 2115 | "_target": null, |
| 2116 | "_alignFlags": 12, | 2116 | "_alignFlags": 12, |
| 2117 | "_left": 338.5, | 2117 | "_left": 230, |
| 2118 | "_right": 0, | 2118 | "_right": 0, |
| 2119 | "_top": 119, | 2119 | "_top": 119, |
| 2120 | "_bottom": 0, | 2120 | "_bottom": 0, | ... | ... |
| ... | @@ -57,7 +57,7 @@ | ... | @@ -57,7 +57,7 @@ |
| 57 | "_is3DNode": true, | 57 | "_is3DNode": true, |
| 58 | "_groupIndex": 0, | 58 | "_groupIndex": 0, |
| 59 | "groupIndex": 0, | 59 | "groupIndex": 0, |
| 60 | "autoReleaseAssets": true, | 60 | "autoReleaseAssets": false, |
| 61 | "_id": "77eede39-2337-45ac-ba31-eb6e433ff217" | 61 | "_id": "77eede39-2337-45ac-ba31-eb6e433ff217" |
| 62 | }, | 62 | }, |
| 63 | { | 63 | { |
| ... | @@ -207,7 +207,7 @@ | ... | @@ -207,7 +207,7 @@ |
| 207 | "array": [ | 207 | "array": [ |
| 208 | 0, | 208 | 0, |
| 209 | 0, | 209 | 0, |
| 210 | 265.0037841796875, | 210 | 271.0659484863281, |
| 211 | 0, | 211 | 0, |
| 212 | 0, | 212 | 0, |
| 213 | 0, | 213 | 0, |
| ... | @@ -602,7 +602,7 @@ | ... | @@ -602,7 +602,7 @@ |
| 602 | }, | 602 | }, |
| 603 | "_contentSize": { | 603 | "_contentSize": { |
| 604 | "__type__": "cc.Size", | 604 | "__type__": "cc.Size", |
| 605 | "width": 216, | 605 | "width": 0, |
| 606 | "height": 63 | 606 | "height": 63 |
| 607 | }, | 607 | }, |
| 608 | "_anchorPoint": { | 608 | "_anchorPoint": { |
| ... | @@ -614,7 +614,7 @@ | ... | @@ -614,7 +614,7 @@ |
| 614 | "__type__": "TypedArray", | 614 | "__type__": "TypedArray", |
| 615 | "ctor": "Float32Array", | 615 | "ctor": "Float32Array", |
| 616 | "array": [ | 616 | "array": [ |
| 617 | 120, | 617 | 12, |
| 618 | 272.5, | 618 | 272.5, |
| 619 | 0, | 619 | 0, |
| 620 | 0, | 620 | 0, |
| ... | @@ -1345,7 +1345,7 @@ | ... | @@ -1345,7 +1345,7 @@ |
| 1345 | "__type__": "TypedArray", | 1345 | "__type__": "TypedArray", |
| 1346 | "ctor": "Float32Array", | 1346 | "ctor": "Float32Array", |
| 1347 | "array": [ | 1347 | "array": [ |
| 1348 | -78, | 1348 | 30, |
| 1349 | -36.400001525878906, | 1349 | -36.400001525878906, |
| 1350 | 0, | 1350 | 0, |
| 1351 | 0, | 1351 | 0, |
| ... | @@ -1469,7 +1469,7 @@ | ... | @@ -1469,7 +1469,7 @@ |
| 1469 | "__type__": "TypedArray", | 1469 | "__type__": "TypedArray", |
| 1470 | "ctor": "Float32Array", | 1470 | "ctor": "Float32Array", |
| 1471 | "array": [ | 1471 | "array": [ |
| 1472 | 54, | 1472 | 162, |
| 1473 | -36.400001525878906, | 1473 | -36.400001525878906, |
| 1474 | 0, | 1474 | 0, |
| 1475 | 0, | 1475 | 0, |
| ... | @@ -1593,7 +1593,7 @@ | ... | @@ -1593,7 +1593,7 @@ |
| 1593 | "__type__": "TypedArray", | 1593 | "__type__": "TypedArray", |
| 1594 | "ctor": "Float32Array", | 1594 | "ctor": "Float32Array", |
| 1595 | "array": [ | 1595 | "array": [ |
| 1596 | 243, | 1596 | 351, |
| 1597 | -36.400001525878906, | 1597 | -36.400001525878906, |
| 1598 | 0, | 1598 | 0, |
| 1599 | 0, | 1599 | 0, |
| ... | @@ -1691,8 +1691,8 @@ | ... | @@ -1691,8 +1691,8 @@ |
| 1691 | } | 1691 | } |
| 1692 | ], | 1692 | ], |
| 1693 | "_useOriginalSize": false, | 1693 | "_useOriginalSize": false, |
| 1694 | "_string": "疯狂赛车手手", | 1694 | "_string": "", |
| 1695 | "_N$string": "疯狂赛车手手", | 1695 | "_N$string": "", |
| 1696 | "_fontSize": 36, | 1696 | "_fontSize": 36, |
| 1697 | "_lineHeight": 50, | 1697 | "_lineHeight": 50, |
| 1698 | "_enableWrapText": true, | 1698 | "_enableWrapText": true, |
| ... | @@ -2137,7 +2137,7 @@ | ... | @@ -2137,7 +2137,7 @@ |
| 2137 | "_contentSize": { | 2137 | "_contentSize": { |
| 2138 | "__type__": "cc.Size", | 2138 | "__type__": "cc.Size", |
| 2139 | "width": 564, | 2139 | "width": 564, |
| 2140 | "height": 60 | 2140 | "height": 120 |
| 2141 | }, | 2141 | }, |
| 2142 | "_anchorPoint": { | 2142 | "_anchorPoint": { |
| 2143 | "__type__": "cc.Vec2", | 2143 | "__type__": "cc.Vec2", |
| ... | @@ -2149,7 +2149,7 @@ | ... | @@ -2149,7 +2149,7 @@ |
| 2149 | "ctor": "Float32Array", | 2149 | "ctor": "Float32Array", |
| 2150 | "array": [ | 2150 | "array": [ |
| 2151 | 294, | 2151 | 294, |
| 2152 | 191, | 2152 | 161, |
| 2153 | 0, | 2153 | 0, |
| 2154 | 0, | 2154 | 0, |
| 2155 | 0, | 2155 | 0, |
| ... | @@ -2260,8 +2260,8 @@ | ... | @@ -2260,8 +2260,8 @@ |
| 2260 | }, | 2260 | }, |
| 2261 | "_contentSize": { | 2261 | "_contentSize": { |
| 2262 | "__type__": "cc.Size", | 2262 | "__type__": "cc.Size", |
| 2263 | "width": 200, | 2263 | "width": 264, |
| 2264 | "height": 52 | 2264 | "height": 100 |
| 2265 | }, | 2265 | }, |
| 2266 | "_anchorPoint": { | 2266 | "_anchorPoint": { |
| 2267 | "__type__": "cc.Vec2", | 2267 | "__type__": "cc.Vec2", |
| ... | @@ -2272,8 +2272,8 @@ | ... | @@ -2272,8 +2272,8 @@ |
| 2272 | "__type__": "TypedArray", | 2272 | "__type__": "TypedArray", |
| 2273 | "ctor": "Float32Array", | 2273 | "ctor": "Float32Array", |
| 2274 | "array": [ | 2274 | "array": [ |
| 2275 | 112, | 2275 | 144, |
| 2276 | 13, | 2276 | 10, |
| 2277 | 0, | 2277 | 0, |
| 2278 | 0, | 2278 | 0, |
| 2279 | 0, | 2279 | 0, |
| ... | @@ -2313,7 +2313,7 @@ | ... | @@ -2313,7 +2313,7 @@ |
| 2313 | "_srcBlendFactor": 770, | 2313 | "_srcBlendFactor": 770, |
| 2314 | "_dstBlendFactor": 771, | 2314 | "_dstBlendFactor": 771, |
| 2315 | "_spriteFrame": { | 2315 | "_spriteFrame": { |
| 2316 | "__uuid__": "2c3552e2-5961-4541-ab46-068aeabbf034" | 2316 | "__uuid__": "74d68834-c4a7-44a8-b9e0-2fa2693ba5e4" |
| 2317 | }, | 2317 | }, |
| 2318 | "_type": 0, | 2318 | "_type": 0, |
| 2319 | "_sizeMode": 0, | 2319 | "_sizeMode": 0, |
| ... | @@ -2342,7 +2342,7 @@ | ... | @@ -2342,7 +2342,7 @@ |
| 2342 | "_alignFlags": 9, | 2342 | "_alignFlags": 9, |
| 2343 | "_left": 652, | 2343 | "_left": 652, |
| 2344 | "_right": 0, | 2344 | "_right": 0, |
| 2345 | "_top": 321, | 2345 | "_top": 300, |
| 2346 | "_bottom": 0, | 2346 | "_bottom": 0, |
| 2347 | "_verticalCenter": 0, | 2347 | "_verticalCenter": 0, |
| 2348 | "_horizontalCenter": 0, | 2348 | "_horizontalCenter": 0, |
| ... | @@ -2458,7 +2458,7 @@ | ... | @@ -2458,7 +2458,7 @@ |
| 2458 | "__id__": 2 | 2458 | "__id__": 2 |
| 2459 | }, | 2459 | }, |
| 2460 | "_children": [], | 2460 | "_children": [], |
| 2461 | "_active": true, | 2461 | "_active": false, |
| 2462 | "_components": [ | 2462 | "_components": [ |
| 2463 | { | 2463 | { |
| 2464 | "__id__": 56 | 2464 | "__id__": 56 |
| ... | @@ -2530,9 +2530,7 @@ | ... | @@ -2530,9 +2530,7 @@ |
| 2530 | ], | 2530 | ], |
| 2531 | "_srcBlendFactor": 770, | 2531 | "_srcBlendFactor": 770, |
| 2532 | "_dstBlendFactor": 771, | 2532 | "_dstBlendFactor": 771, |
| 2533 | "_spriteFrame": { | 2533 | "_spriteFrame": null, |
| 2534 | "__uuid__": "431c5199-fa09-462c-8892-21eb3d0e0b89" | ||
| 2535 | }, | ||
| 2536 | "_type": 0, | 2534 | "_type": 0, |
| 2537 | "_sizeMode": 0, | 2535 | "_sizeMode": 0, |
| 2538 | "_fillType": 0, | 2536 | "_fillType": 0, |
| ... | @@ -2576,7 +2574,7 @@ | ... | @@ -2576,7 +2574,7 @@ |
| 2576 | }, | 2574 | }, |
| 2577 | { | 2575 | { |
| 2578 | "__type__": "cc.Node", | 2576 | "__type__": "cc.Node", |
| 2579 | "_name": "New Label", | 2577 | "_name": "NewLabel", |
| 2580 | "_objFlags": 0, | 2578 | "_objFlags": 0, |
| 2581 | "_parent": { | 2579 | "_parent": { |
| 2582 | "__id__": 2 | 2580 | "__id__": 2 | ... | ... |
| ... | @@ -906,7 +906,7 @@ | ... | @@ -906,7 +906,7 @@ |
| 906 | "__id__": 35 | 906 | "__id__": 35 |
| 907 | } | 907 | } |
| 908 | ], | 908 | ], |
| 909 | "_active": true, | 909 | "_active": false, |
| 910 | "_components": [ | 910 | "_components": [ |
| 911 | { | 911 | { |
| 912 | "__id__": 40 | 912 | "__id__": 40 |
| ... | @@ -2054,7 +2054,7 @@ | ... | @@ -2054,7 +2054,7 @@ |
| 2054 | "__id__": 8 | 2054 | "__id__": 8 |
| 2055 | }, | 2055 | }, |
| 2056 | "_children": [], | 2056 | "_children": [], |
| 2057 | "_active": true, | 2057 | "_active": false, |
| 2058 | "_components": [ | 2058 | "_components": [ |
| 2059 | { | 2059 | { |
| 2060 | "__id__": 46 | 2060 | "__id__": 46 | ... | ... |
| ... | @@ -175,12 +175,12 @@ cc.Class({ | ... | @@ -175,12 +175,12 @@ cc.Class({ |
| 175 | // case BusinessParameter.CARTOON_APPID: | 175 | // case BusinessParameter.CARTOON_APPID: |
| 176 | // this._oSceneContext.focusPath = this._oSceneContext.focusPath || "SongList/DataContainerMask/DataContainer/ListCell0/SongTitleContainer"; | 176 | // this._oSceneContext.focusPath = this._oSceneContext.focusPath || "SongList/DataContainerMask/DataContainer/ListCell0/SongTitleContainer"; |
| 177 | this._strSongListCellComponentName = "pfbCategoryListCell"; | 177 | this._strSongListCellComponentName = "pfbCategoryListCell"; |
| 178 | this._iBeginPositionX = -289.5; | 178 | this._iBeginPositionX = -350; |
| 179 | this._iBeginPositionY = 196; | 179 | this._iBeginPositionY = 196; |
| 180 | this._iShowCellRows = 3; | 180 | this._iShowCellRows = 3; |
| 181 | this._iAlphaCellRows = 0; | 181 | this._iAlphaCellRows = 0; |
| 182 | this._iHiddenCellRows = 3; | 182 | this._iHiddenCellRows = 3; |
| 183 | this._iCellCountEachRow = 3; | 183 | this._iCellCountEachRow = 4; |
| 184 | this._fCellMarginTop = 0; | 184 | this._fCellMarginTop = 0; |
| 185 | this._fCellMarginRight = 24; | 185 | this._fCellMarginRight = 24; |
| 186 | this._fCellMarginBottom = 16; | 186 | this._fCellMarginBottom = 16; | ... | ... |
| ... | @@ -70,8 +70,8 @@ cc.Class({ | ... | @@ -70,8 +70,8 @@ cc.Class({ |
| 70 | this._nodeTypeList.addComponent(TVScrollParameter); | 70 | this._nodeTypeList.addComponent(TVScrollParameter); |
| 71 | 71 | ||
| 72 | // cc.find("Desc/Collect", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 172, 56)); | 72 | // cc.find("Desc/Collect", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 172, 56)); |
| 73 | cc.find("ButtonOpen", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 278, 72)); | 73 | cc.find("ButtonOpen", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 264, 100)); |
| 74 | cc.find("ButtonVip", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 572, 72)); | 74 | // cc.find("ButtonVip", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 572, 72)); |
| 75 | cc.find("FullView", this.node).zIndex = 100; | 75 | cc.find("FullView", this.node).zIndex = 100; |
| 76 | 76 | ||
| 77 | this._nodeTypeListWrapper = cc.find("TypeListArea/TypeListWrapper", this.node); | 77 | this._nodeTypeListWrapper = cc.find("TypeListArea/TypeListWrapper", this.node); |
| ... | @@ -281,8 +281,8 @@ cc.Class({ | ... | @@ -281,8 +281,8 @@ cc.Class({ |
| 281 | cc.find("Desc/LabelTime", this.node).getComponent(cc.Label).string = oJSONResult.resultSet[0].updateTime; | 281 | cc.find("Desc/LabelTime", this.node).getComponent(cc.Label).string = oJSONResult.resultSet[0].updateTime; |
| 282 | //这里给描述做拦截,防止字数多超出栏目 | 282 | //这里给描述做拦截,防止字数多超出栏目 |
| 283 | var description = oJSONResult.resultSet[0].description; | 283 | var description = oJSONResult.resultSet[0].description; |
| 284 | if (description.length > 55) { | 284 | if (description.length > 110) { |
| 285 | description = description.substring(0, 55) + "..."; | 285 | description = description.substring(0, 110) + "..."; |
| 286 | } | 286 | } |
| 287 | cc.find("Desc/LabelDesc", this.node).getComponent(cc.Label).string = description; | 287 | cc.find("Desc/LabelDesc", this.node).getComponent(cc.Label).string = description; |
| 288 | //搞标签 | 288 | //搞标签 |
| ... | @@ -369,7 +369,7 @@ cc.Class({ | ... | @@ -369,7 +369,7 @@ cc.Class({ |
| 369 | if (0 == nodeInitFocus.name.indexOf('Button')) { | 369 | if (0 == nodeInitFocus.name.indexOf('Button')) { |
| 370 | this._cFocus.hide(); | 370 | this._cFocus.hide(); |
| 371 | cc.loader.loadRes("GameDetail/icon_button_open", cc.Texture2D, function (err, texture) { | 371 | cc.loader.loadRes("GameDetail/icon_button_open", cc.Texture2D, function (err, texture) { |
| 372 | nodeInitFocus.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 72, 278, 72)); | 372 | nodeInitFocus.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 100, 264, 100)); |
| 373 | }); | 373 | }); |
| 374 | } | 374 | } |
| 375 | 375 | ||
| ... | @@ -510,7 +510,7 @@ cc.Class({ | ... | @@ -510,7 +510,7 @@ cc.Class({ |
| 510 | 510 | ||
| 511 | if (0 == fiFrom.node.getName().indexOf('ButtonOpen')) { | 511 | if (0 == fiFrom.node.getName().indexOf('ButtonOpen')) { |
| 512 | cc.loader.loadRes("GameDetail/icon_button_open", cc.Texture2D, function (err, texture) { | 512 | cc.loader.loadRes("GameDetail/icon_button_open", cc.Texture2D, function (err, texture) { |
| 513 | fiFrom.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, 278, 72)); | 513 | fiFrom.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, 264, 100)); |
| 514 | }); | 514 | }); |
| 515 | } | 515 | } |
| 516 | 516 | ||
| ... | @@ -545,7 +545,7 @@ cc.Class({ | ... | @@ -545,7 +545,7 @@ cc.Class({ |
| 545 | if (0 == fiTo.node.getName().indexOf('ButtonOpen')) { | 545 | if (0 == fiTo.node.getName().indexOf('ButtonOpen')) { |
| 546 | // fiTo.node.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, fiTo.node.height, fiTo.node.width, fiTo.node.height)); | 546 | // fiTo.node.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, fiTo.node.height, fiTo.node.width, fiTo.node.height)); |
| 547 | cc.loader.loadRes("GameDetail/icon_button_open", cc.Texture2D, function (err, texture) { | 547 | cc.loader.loadRes("GameDetail/icon_button_open", cc.Texture2D, function (err, texture) { |
| 548 | fiTo.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 72, 278, 72)); | 548 | fiTo.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 100, 264, 100)); |
| 549 | }); | 549 | }); |
| 550 | } | 550 | } |
| 551 | 551 | ... | ... |
| ... | @@ -37,6 +37,9 @@ cc.Class({ | ... | @@ -37,6 +37,9 @@ cc.Class({ |
| 37 | 37 | ||
| 38 | cc.log("gameLoading包名:" + this._oSceneContext._downloadUrl); | 38 | cc.log("gameLoading包名:" + this._oSceneContext._downloadUrl); |
| 39 | 39 | ||
| 40 | if (!cc.sys.isNative) { | ||
| 41 | return; | ||
| 42 | } | ||
| 40 | if (this._oSceneContext._downloadUrl && this._oSceneContext._downloadUrl != "undefined") { //如果有下载地址就启动奥比游戏 | 43 | if (this._oSceneContext._downloadUrl && this._oSceneContext._downloadUrl != "undefined") { //如果有下载地址就启动奥比游戏 |
| 41 | jsb.reflection.callStaticMethod("com/topdraw/melody/TopdrawSDKWrapper", "startOBiGame", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", this._oSceneContext._downloadUrl, this._oSceneContext._packageName, this._oSceneContext._className, "updateProgress"); | 44 | jsb.reflection.callStaticMethod("com/topdraw/melody/TopdrawSDKWrapper", "startOBiGame", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", this._oSceneContext._downloadUrl, this._oSceneContext._packageName, this._oSceneContext._className, "updateProgress"); |
| 42 | } else { | 45 | } else { |
| ... | @@ -51,7 +54,6 @@ cc.Class({ | ... | @@ -51,7 +54,6 @@ cc.Class({ |
| 51 | let nodeBar = cc.find("ProgressBar/bar", this.node); | 54 | let nodeBar = cc.find("ProgressBar/bar", this.node); |
| 52 | nodeBar.width = strProgress / 100 * progressBarWidth; | 55 | nodeBar.width = strProgress / 100 * progressBarWidth; |
| 53 | 56 | ||
| 54 | // this._downloadUrl && this._downloadUrl != "undefined" && | ||
| 55 | if (strProgress == "100") { | 57 | if (strProgress == "100") { |
| 56 | this._bIsFocusInit = true; | 58 | this._bIsFocusInit = true; |
| 57 | this.backAScene(); | 59 | this.backAScene(); | ... | ... |
| ... | @@ -208,9 +208,20 @@ cc.Class({ | ... | @@ -208,9 +208,20 @@ cc.Class({ |
| 208 | 208 | ||
| 209 | self.getTopNaviRequest("topNavi"); | 209 | self.getTopNaviRequest("topNavi"); |
| 210 | self.getTopNaviRequest("topCell"); | 210 | self.getTopNaviRequest("topCell"); |
| 211 | |||
| 212 | self.getRecommendModelRequest(); | 211 | self.getRecommendModelRequest(); |
| 213 | self.getRightRecommendRequest(); // | 212 | |
| 213 | //在这里选择是初始化首页瀑布流还是初始化其他导航的列表数据 | ||
| 214 | if (this._oSceneContext._iCurrentLeftIndex == 1) { | ||
| 215 | cc.log("初始化瀑布流"); | ||
| 216 | self.getRightRecommendRequestData(); | ||
| 217 | cc.find("scrollContent/ViewPagerArea", this.node).active = true; | ||
| 218 | cc.find("scrollContent/BlockShadow", this.node).active = true; | ||
| 219 | } else { | ||
| 220 | this.getSimulateRequest(); | ||
| 221 | cc.find("scrollContent/ViewPagerArea", this.node).active = false; | ||
| 222 | cc.find("scrollContent/BlockShadow", this.node).active = false; | ||
| 223 | } | ||
| 224 | |||
| 214 | } catch (error) { | 225 | } catch (error) { |
| 215 | cc.log("Business Exception:Get getMainLayoutJsonRequest..." + error); | 226 | cc.log("Business Exception:Get getMainLayoutJsonRequest..." + error); |
| 216 | } | 227 | } |
| ... | @@ -361,255 +372,274 @@ cc.Class({ | ... | @@ -361,255 +372,274 @@ cc.Class({ |
| 361 | } | 372 | } |
| 362 | }, | 373 | }, |
| 363 | 374 | ||
| 375 | getRightRecommendRequestData: function () { | ||
| 376 | if (this._oInit.main_recommend) { | ||
| 377 | this.getRightRecommendRequest(); | ||
| 378 | return; | ||
| 379 | } | ||
| 380 | Network.ajax("GET", Common.TOPDRAW_API_SERVER + "main/main_recommend.json", null, null, | ||
| 381 | function (strResponse) { | ||
| 382 | try { | ||
| 383 | this._oInit.main_recommend = strResponse; | ||
| 384 | this.getRightRecommendRequest(); | ||
| 385 | } catch (error) { | ||
| 386 | cc.log("Business Exception:Get getRightRecommendRequest..." + error); | ||
| 387 | } | ||
| 388 | }, | ||
| 389 | function (strResponse) { | ||
| 390 | cc.log("Business Error:Get getRightRecommendRequest..." + strResponse); | ||
| 391 | }, this, "uuid"); | ||
| 392 | }, | ||
| 393 | |||
| 364 | //渲染推荐框架 | 394 | //渲染推荐框架 |
| 365 | getRightRecommendRequest: function () { | 395 | getRightRecommendRequest: function () { |
| 366 | var self = this; | 396 | var self = this; |
| 367 | var rightNodeLayout = this.targetAry[1].target; | 397 | var rightNodeLayout = this.targetAry[1].target; |
| 368 | Network.ajax("GET", Common.TOPDRAW_API_SERVER + "main/main_recommend.json", null, null, | 398 | // Network.ajax("GET", Common.TOPDRAW_API_SERVER + "main/main_recommend.json", null, null, |
| 369 | function (strResponse) { | 399 | // function (strResponse) { |
| 370 | try { | 400 | try { |
| 371 | // var arrModules = waterfall_model.waterfall; //拿到模拟数据 | 401 | // var arrModules = waterfall_model.waterfall; //拿到模拟数据 |
| 372 | // var arrModules = this.test_json.json; | 402 | // var arrModules = this.test_json.json; |
| 373 | var arrModules = JSON.parse(strResponse); | 403 | var arrModules = JSON.parse(this._oInit.main_recommend); |
| 374 | var bgHeight = 0; | 404 | var bgHeight = 0; |
| 375 | this._aBgHeight = []; | 405 | this._aBgHeight = []; |
| 376 | this._aBgHeight.push(0); | 406 | this._aBgHeight.push(0); |
| 377 | for (let i = 0; i < arrModules.resultSet.length; i++) { | 407 | for (let i = 0; i < arrModules.resultSet.length; i++) { |
| 378 | let nodeLayout = new cc.Node(arrModules.resultSet[i].name); //创建瀑布流的每一层layout | 408 | let nodeLayout = new cc.Node(arrModules.resultSet[i].name); //创建瀑布流的每一层layout |
| 379 | nodeLayout.width = this._iRightRecommendHeight; | 409 | nodeLayout.width = this._iRightRecommendHeight; |
| 380 | nodeLayout.height = arrModules.resultSet[i].height; | 410 | nodeLayout.height = arrModules.resultSet[i].height; |
| 381 | var widgetLayout = nodeLayout.addComponent(cc.Widget); | 411 | var widgetLayout = nodeLayout.addComponent(cc.Widget); |
| 382 | widgetLayout.isAlignTop = true; | 412 | widgetLayout.isAlignTop = true; |
| 383 | widgetLayout.isAlignLeft = true; | 413 | widgetLayout.isAlignLeft = true; |
| 384 | widgetLayout.top = bgHeight; | 414 | widgetLayout.top = bgHeight; |
| 385 | widgetLayout.left = 0; | 415 | widgetLayout.left = 0; |
| 386 | bgHeight += arrModules.resultSet[i].height; //逐层增加高度 | 416 | bgHeight += arrModules.resultSet[i].height; //逐层增加高度 |
| 387 | // cc.log("高度" + bgHeight); | 417 | // cc.log("高度" + bgHeight); |
| 388 | if (i == arrModules.resultSet.length - 1) { //最后一个条目不够高,手动加高 | 418 | if (i == arrModules.resultSet.length - 1) { //最后一个条目不够高,手动加高 |
| 389 | bgHeight += 300; | 419 | bgHeight += 300; |
| 420 | } | ||
| 421 | this._aBgHeight.push(bgHeight); // | ||
| 422 | if (arrModules.resultSet[i].hasChildFrame) { //还有子列表 | ||
| 423 | for (let j = 0; j < arrModules.resultSet[i].data.resultSet.length; j++) { | ||
| 424 | let oModule = arrModules.resultSet[i].data.resultSet[j]; | ||
| 425 | if (oModule.hasChildFrame && oModule.name == "SpecialList") { //子布局需要左右滑动 | ||
| 426 | let specialListAreaNode = cc.find("SpecialListArea", this.node); | ||
| 427 | let specialListRectNode = cc.find("SpecialListWrapper", specialListAreaNode); | ||
| 428 | let specialListNode = cc.find("SpecialList", specialListRectNode); | ||
| 429 | this._specialListRectNode = specialListRectNode; | ||
| 430 | this._specialListNode = specialListNode; | ||
| 431 | this._specialListNode.addComponent(TVScrollParameter); | ||
| 432 | specialListAreaNode.width = 1280 - oModule.position[0]; | ||
| 433 | specialListRectNode.width = 1280 - oModule.position[0]; | ||
| 434 | specialListAreaNode.height = oModule.height; | ||
| 435 | specialListRectNode.height = oModule.height; | ||
| 436 | specialListAreaNode.getComponent(cc.Widget).top = oModule.position[1]; | ||
| 437 | specialListAreaNode.getComponent(cc.Widget).left = oModule.position[0]; | ||
| 438 | for (let k = 0; k < oModule.data.resultSet.length; k++) { //渲染子细胞 | ||
| 439 | let node = cc.instantiate(this.PFB_COMMON); | ||
| 440 | if (oModule.childrenSize[0] && oModule.childrenSize[1]) { | ||
| 441 | node.height = oModule.childrenSize[1]; //拿子节点的高 | ||
| 442 | node.width = oModule.childrenSize[0]; | ||
| 443 | node.getChildByName('Pic').height = oModule.childrenSize[1]; //拿子节点的高 | ||
| 444 | node.getChildByName('Pic').width = oModule.childrenSize[0]; | ||
| 445 | } | ||
| 446 | // if (oModule.data.resultSet[k].imageURL) { | ||
| 447 | // cc.loader.loadRes(oModule.data.resultSet[k].imageURL, cc.Texture2D, function (err, texture) { | ||
| 448 | // node.getChildByName('Pic').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture); | ||
| 449 | // }); | ||
| 450 | // } | ||
| 451 | Network.loadImageInNativeRuntime( | ||
| 452 | Common.TOPDRAW_IMAGE_SERVER + oModule.data.resultSet[k].imageURL, null, | ||
| 453 | function (texture, iRequestId) { | ||
| 454 | node.getChildByName('Pic').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture); | ||
| 455 | }, function () { }, this | ||
| 456 | ); | ||
| 457 | |||
| 458 | node.x = node.width / 2 + k * (node.width + 24) - 20; | ||
| 459 | // node.getComponent(cc.Widget).top = 0; | ||
| 460 | // node.getComponent(cc.Widget).left = node.width / 2 + k * (node.width + 24); | ||
| 461 | |||
| 462 | specialListNode.addChild(node, 10, "SpecialList" + k); | ||
| 463 | |||
| 464 | //准备焦点坐标 | ||
| 465 | let fiNodeBlock = node.addComponent(FocusInfo); | ||
| 466 | fiNodeBlock.init('', true, null, null, 1.1); | ||
| 467 | fiNodeBlock.init( | ||
| 468 | oModule.data.resultSet[k].tvlink, true, null, null, 1.0 //最后一个参数决定要不要放大显示 | ||
| 469 | ); | ||
| 470 | this._aFocusTargets[0]["SpecialList" + k] = node; | ||
| 471 | } | ||
| 472 | |||
| 473 | specialListAreaNode.removeFromParent(); | ||
| 474 | nodeLayout.addChild(specialListAreaNode, 10, "hasChildFrame"); | ||
| 390 | } | 475 | } |
| 391 | this._aBgHeight.push(bgHeight); // | 476 | else if (oModule.hasChildFrame && oModule.name != "SpecialList") { |
| 392 | if (arrModules.resultSet[i].hasChildFrame) { //还有子列表 | 477 | let autoNode = new cc.Node(); //创建特殊层的第二层自动填充的布局 |
| 393 | for (let j = 0; j < arrModules.resultSet[i].data.resultSet.length; j++) { | 478 | let autoNodeLayout = autoNode.addComponent(cc.Layout); |
| 394 | let oModule = arrModules.resultSet[i].data.resultSet[j]; | 479 | autoNodeLayout.type = cc.Layout.Type.GRID; //网格 |
| 395 | if (oModule.hasChildFrame && oModule.name == "SpecialList") { //子布局需要左右滑动 | 480 | autoNodeLayout.resizeMode = cc.Layout.ResizeMode.CHILDREN; //对子节点大小进行缩放 |
| 396 | let specialListAreaNode = cc.find("SpecialListArea", this.node); | 481 | autoNodeLayout.startAxis = cc.Layout.AxisDirection.HORIZONTAL; //排版起始轴 |
| 397 | let specialListRectNode = cc.find("SpecialListWrapper", specialListAreaNode); | 482 | autoNodeLayout.horizontalDirection = cc.Layout.HorizontalDirection.LEFT_TO_RIGHT; //布局方向 |
| 398 | let specialListNode = cc.find("SpecialList", specialListRectNode); | 483 | let widgetAutoNode = autoNode.addComponent(cc.Widget); |
| 399 | this._specialListRectNode = specialListRectNode; | 484 | widgetAutoNode.isAlignLeft = true; |
| 400 | this._specialListNode = specialListNode; | 485 | widgetAutoNode.isAlignTop = true; |
| 401 | this._specialListNode.addComponent(TVScrollParameter); | 486 | autoNode.width = oModule.width; //获取自动布局宽高 |
| 402 | specialListAreaNode.width = 1280 - oModule.position[0]; | 487 | if (oModule.childrenSize[0] && oModule.childrenSize[1]) { |
| 403 | specialListRectNode.width = 1280 - oModule.position[0]; | 488 | autoNode.height = oModule.childrenSize[1]; //拿子节点的高 |
| 404 | specialListAreaNode.height = oModule.height; | 489 | autoNodeLayout.cellSize = new cc.size(oModule.childrenSize[0], oModule.childrenSize[1]); |
| 405 | specialListRectNode.height = oModule.height; | 490 | } |
| 406 | specialListAreaNode.getComponent(cc.Widget).top = oModule.position[1]; | 491 | if (oModule.childrenMargin[1]) { //细胞间隔小些 |
| 407 | specialListAreaNode.getComponent(cc.Widget).left = oModule.position[0]; | 492 | autoNodeLayout.spacingX = oModule.childrenMargin[1]; |
| 408 | for (let k = 0; k < oModule.data.resultSet.length; k++) { //渲染子细胞 | 493 | } |
| 409 | let node = cc.instantiate(this.PFB_COMMON); | 494 | if (oModule.position[0] != "undefined" && oModule.position[1] != "undefined") { //确定位置 |
| 410 | if (oModule.childrenSize[0] && oModule.childrenSize[1]) { | 495 | widgetAutoNode.top = oModule.position[1]; |
| 411 | node.height = oModule.childrenSize[1]; //拿子节点的高 | 496 | widgetAutoNode.left = oModule.position[0]; |
| 412 | node.width = oModule.childrenSize[0]; | 497 | } |
| 413 | node.getChildByName('Pic').height = oModule.childrenSize[1]; //拿子节点的高 | 498 | for (let k = 0; k < oModule.data.resultSet.length; k++) { //渲染子细胞 |
| 414 | node.getChildByName('Pic').width = oModule.childrenSize[0]; | 499 | let node = cc.instantiate(this.PFB_MAIN_HIGH_SCORE); |
| 415 | } | 500 | if (oModule.childrenSize[0] && oModule.childrenSize[1]) { |
| 416 | // if (oModule.data.resultSet[k].imageURL) { | 501 | node.height = oModule.childrenSize[1]; //拿子节点的高 |
| 417 | // cc.loader.loadRes(oModule.data.resultSet[k].imageURL, cc.Texture2D, function (err, texture) { | 502 | node.width = oModule.childrenSize[0]; |
| 418 | // node.getChildByName('Pic').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture); | 503 | if (oModule.name != "highScore") { |
| 419 | // }); | 504 | node.getChildByName('Pic').height = oModule.childrenSize[1]; //拿子节点的高 |
| 420 | // } | 505 | node.getChildByName('Pic').width = oModule.childrenSize[0]; |
| 421 | Network.loadImageInNativeRuntime( | ||
| 422 | Common.TOPDRAW_IMAGE_SERVER + oModule.data.resultSet[k].imageURL, null, | ||
| 423 | function (texture, iRequestId) { | ||
| 424 | node.getChildByName('Pic').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture); | ||
| 425 | }, function () { }, this | ||
| 426 | ); | ||
| 427 | |||
| 428 | node.x = node.width / 2 + k * (node.width + 24) - 20; | ||
| 429 | // node.getComponent(cc.Widget).top = 0; | ||
| 430 | // node.getComponent(cc.Widget).left = node.width / 2 + k * (node.width + 24); | ||
| 431 | |||
| 432 | specialListNode.addChild(node, 10, "SpecialList" + k); | ||
| 433 | |||
| 434 | //准备焦点坐标 | ||
| 435 | let fiNodeBlock = node.addComponent(FocusInfo); | ||
| 436 | fiNodeBlock.init('', true, null, null, 1.1); | ||
| 437 | fiNodeBlock.init( | ||
| 438 | oModule.data.resultSet[k].tvlink, true, null, null, 1.0 //最后一个参数决定要不要放大显示 | ||
| 439 | ); | ||
| 440 | this._aFocusTargets[0]["SpecialList" + k] = node; | ||
| 441 | } | 506 | } |
| 442 | |||
| 443 | specialListAreaNode.removeFromParent(); | ||
| 444 | nodeLayout.addChild(specialListAreaNode, 10, "hasChildFrame"); | ||
| 445 | } | 507 | } |
| 446 | else if (oModule.hasChildFrame && oModule.name != "SpecialList") { | 508 | if (oModule.data.resultSet[k].imageURL) { |
| 447 | let autoNode = new cc.Node(); //创建特殊层的第二层自动填充的布局 | 509 | // cc.loader.loadRes(oModule.data.resultSet[k].imageURL, cc.Texture2D, function (err, texture) { |
| 448 | let autoNodeLayout = autoNode.addComponent(cc.Layout); | 510 | // node.getChildByName('Pic').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture); |
| 449 | autoNodeLayout.type = cc.Layout.Type.GRID; //网格 | 511 | // }); |
| 450 | autoNodeLayout.resizeMode = cc.Layout.ResizeMode.CHILDREN; //对子节点大小进行缩放 | 512 | Network.loadImageInNativeRuntime( |
| 451 | autoNodeLayout.startAxis = cc.Layout.AxisDirection.HORIZONTAL; //排版起始轴 | 513 | Common.TOPDRAW_IMAGE_SERVER + oModule.data.resultSet[k].imageURL, null, |
| 452 | autoNodeLayout.horizontalDirection = cc.Layout.HorizontalDirection.LEFT_TO_RIGHT; //布局方向 | 514 | function (texture, iRequestId) { |
| 453 | let widgetAutoNode = autoNode.addComponent(cc.Widget); | 515 | node.getChildByName('Pic').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture); |
| 454 | widgetAutoNode.isAlignLeft = true; | 516 | }, function () { }, this |
| 455 | widgetAutoNode.isAlignTop = true; | 517 | ); |
| 456 | autoNode.width = oModule.width; //获取自动布局宽高 | 518 | } |
| 457 | if (oModule.childrenSize[0] && oModule.childrenSize[1]) { | ||
| 458 | autoNode.height = oModule.childrenSize[1]; //拿子节点的高 | ||
| 459 | autoNodeLayout.cellSize = new cc.size(oModule.childrenSize[0], oModule.childrenSize[1]); | ||
| 460 | } | ||
| 461 | if (oModule.childrenMargin[1]) { //细胞间隔小些 | ||
| 462 | autoNodeLayout.spacingX = oModule.childrenMargin[1]; | ||
| 463 | } | ||
| 464 | if (oModule.position[0] != "undefined" && oModule.position[1] != "undefined") { //确定位置 | ||
| 465 | widgetAutoNode.top = oModule.position[1]; | ||
| 466 | widgetAutoNode.left = oModule.position[0]; | ||
| 467 | } | ||
| 468 | for (let k = 0; k < oModule.data.resultSet.length; k++) { //渲染子细胞 | ||
| 469 | let node = cc.instantiate(this.PFB_MAIN_HIGH_SCORE); | ||
| 470 | if (oModule.childrenSize[0] && oModule.childrenSize[1]) { | ||
| 471 | node.height = oModule.childrenSize[1]; //拿子节点的高 | ||
| 472 | node.width = oModule.childrenSize[0]; | ||
| 473 | if (oModule.name != "highScore") { | ||
| 474 | node.getChildByName('Pic').height = oModule.childrenSize[1]; //拿子节点的高 | ||
| 475 | node.getChildByName('Pic').width = oModule.childrenSize[0]; | ||
| 476 | } | ||
| 477 | } | ||
| 478 | if (oModule.data.resultSet[k].imageURL) { | ||
| 479 | // cc.loader.loadRes(oModule.data.resultSet[k].imageURL, cc.Texture2D, function (err, texture) { | ||
| 480 | // node.getChildByName('Pic').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture); | ||
| 481 | // }); | ||
| 482 | Network.loadImageInNativeRuntime( | ||
| 483 | Common.TOPDRAW_IMAGE_SERVER + oModule.data.resultSet[k].imageURL, null, | ||
| 484 | function (texture, iRequestId) { | ||
| 485 | node.getChildByName('Pic').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture); | ||
| 486 | }, function () { }, this | ||
| 487 | ); | ||
| 488 | } | ||
| 489 | |||
| 490 | //自动布局的文字填充 | ||
| 491 | if (oModule.data.resultSet[k].title_visible == 1) { // | ||
| 492 | node.getComponent('pfbMainHighScoreCell').render(oModule.data.resultSet[k], function () { //让细胞自己渲染文字 | ||
| 493 | |||
| 494 | }, k); | ||
| 495 | } | ||
| 496 | autoNode.addChild(node, 10, oModule.data.resultSet[k].code); | ||
| 497 | |||
| 498 | //准备焦点坐标 | ||
| 499 | let fiNodeBlock = node.addComponent(FocusInfo); | ||
| 500 | // fiNodeBlock.init('', true, null, null, 1.1); | ||
| 501 | fiNodeBlock.init( | ||
| 502 | oModule.data.resultSet[k].tvlink, true, null, null, 1.1 //最后一个参数决定要不要放大显示 | ||
| 503 | ); | ||
| 504 | |||
| 505 | this._aFocusTargets[0][oModule.data.resultSet[k].code] = node; | ||
| 506 | } | ||
| 507 | // autoNode.parent=nodeLayout; | ||
| 508 | // cc.log("添加循环子节点"+autoNode.childrenCount); | ||
| 509 | nodeLayout.addChild(autoNode, 10, "hasChildFrame"); | ||
| 510 | } else { | ||
| 511 | let node = cc.instantiate(this.PFB_COMMON_WIDGET); | ||
| 512 | node.width = oModule.width; | ||
| 513 | node.height = oModule.height; | ||
| 514 | |||
| 515 | if (oModule.imageURL) { | ||
| 516 | if (oModule.name == "backToTop") { | ||
| 517 | // cc.loader.loadRes(oModule.imageURL, cc.Texture2D, function (err, texture) { | ||
| 518 | // node.getChildByName('Pic').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, oModule.width, oModule.height)); | ||
| 519 | // }); | ||
| 520 | this._oInit.backToTopImg = Common.TOPDRAW_IMAGE_SERVER + oModule.imageURL; | ||
| 521 | Network.loadImageInNativeRuntime( | ||
| 522 | Common.TOPDRAW_IMAGE_SERVER + oModule.imageURL, null, | ||
| 523 | function (texture, iRequestId) { | ||
| 524 | node.getChildByName('Pic').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, oModule.width, oModule.height)); | ||
| 525 | }, function () { }, this | ||
| 526 | ); | ||
| 527 | } else { | ||
| 528 | // cc.loader.loadRes(oModule.imageURL, cc.Texture2D, function (err, texture) { | ||
| 529 | // node.getChildByName('Pic').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture); | ||
| 530 | // }); | ||
| 531 | Network.loadImageInNativeRuntime( | ||
| 532 | Common.TOPDRAW_IMAGE_SERVER + oModule.imageURL, null, | ||
| 533 | function (texture, iRequestId) { | ||
| 534 | node.getChildByName('Pic').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture); | ||
| 535 | }, function () { }, this | ||
| 536 | ); | ||
| 537 | } | ||
| 538 | } | ||
| 539 | node.getChildByName('Pic').width = oModule.width; | ||
| 540 | node.getChildByName('Pic').height = oModule.height; | ||
| 541 | node.getChildByName('Pic').getComponent(cc.Sprite).sizeMode = cc.Sprite.SizeMode.CUSTOM; | ||
| 542 | node.getComponent(cc.Widget).top = oModule.top; | ||
| 543 | node.getComponent(cc.Widget).left = oModule.left; | ||
| 544 | nodeLayout.addChild(node, 10, oModule.name); | ||
| 545 | |||
| 546 | if (!oModule.disable) { //标题不给他焦点 | ||
| 547 | //准备焦点坐标 | ||
| 548 | let fiNodeBlock = node.addComponent(FocusInfo); | ||
| 549 | fiNodeBlock.init( | ||
| 550 | oModule.tvlink, true, null, null, 1.06 //最后一个参数决定要不要放大显示 | ||
| 551 | ); | ||
| 552 | this._aFocusTargets[0][oModule.code] = node; | ||
| 553 | } | ||
| 554 | 519 | ||
| 520 | //自动布局的文字填充 | ||
| 521 | if (oModule.data.resultSet[k].title_visible == 1) { // | ||
| 522 | node.getComponent('pfbMainHighScoreCell').render(oModule.data.resultSet[k], function () { //让细胞自己渲染文字 | ||
| 555 | 523 | ||
| 524 | }, k); | ||
| 525 | } | ||
| 526 | autoNode.addChild(node, 10, oModule.data.resultSet[k].code); | ||
| 556 | 527 | ||
| 557 | if (0 == oModule.name.indexOf("blockShadow")) { | 528 | //准备焦点坐标 |
| 558 | node.opacity = 0; | 529 | let fiNodeBlock = node.addComponent(FocusInfo); |
| 559 | } | 530 | // fiNodeBlock.init('', true, null, null, 1.1); |
| 531 | fiNodeBlock.init( | ||
| 532 | oModule.data.resultSet[k].tvlink, true, null, null, 1.1 //最后一个参数决定要不要放大显示 | ||
| 533 | ); | ||
| 560 | 534 | ||
| 561 | // if (oModule.title_visible == 1) { // | 535 | this._aFocusTargets[0][oModule.data.resultSet[k].code] = node; |
| 562 | // cc.find('Name', node).active = true; | 536 | } |
| 563 | // cc.find('Name', node).width = oModule.width - 10; | 537 | // autoNode.parent=nodeLayout; |
| 564 | // cc.find('Name/NameBg', node).width = oModule.width; | 538 | // cc.log("添加循环子节点"+autoNode.childrenCount); |
| 565 | // cc.find('Name/NormalName', node).width = oModule.width - 10; | 539 | nodeLayout.addChild(autoNode, 10, "hasChildFrame"); |
| 566 | // cc.find('Name/ActiveName', node).width = oModule.width - 10; | 540 | } else { |
| 567 | // cc.find('Name/ActiveName/NameContainer', node).width = oModule.width - 10; | 541 | let node = cc.instantiate(this.PFB_COMMON_WIDGET); |
| 568 | // cc.find('Name/ActiveName/NameContainer/NameText', node).width = oModule.width - 10; | 542 | node.width = oModule.width; |
| 569 | // this.normalName.node.width = oModule.width - 10; | 543 | node.height = oModule.height; |
| 570 | // this.activeName1.string = oModule.title; | 544 | |
| 571 | // this.activeName2.string = oModule.title; | 545 | if (oModule.imageURL) { |
| 572 | // this.normalName.string = oModule.title; | 546 | if (oModule.name == "backToTop") { |
| 573 | // this.activeName1._updateRenderData(true); | 547 | // cc.loader.loadRes(oModule.imageURL, cc.Texture2D, function (err, texture) { |
| 574 | // this.activeName2._updateRenderData(true); | 548 | // node.getChildByName('Pic').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, oModule.width, oModule.height)); |
| 575 | // this.normalName._updateRenderData(true); | 549 | // }); |
| 576 | 550 | this._oInit.backToTopImg = Common.TOPDRAW_IMAGE_SERVER + oModule.imageURL; | |
| 577 | // //调整文字位置 | 551 | Network.loadImageInNativeRuntime( |
| 578 | // let nodeCellName = this.node.getChildByName('Name'); | 552 | Common.TOPDRAW_IMAGE_SERVER + oModule.imageURL, null, |
| 579 | // let nodeScreenTitleText = cc.find('ActiveName/NameContainer/NameText', nodeCellName); | 553 | function (texture, iRequestId) { |
| 580 | // let nodeScreenTitleText1 = nodeScreenTitleText.getChildByName('NameText1'); | 554 | node.getChildByName('Pic').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, oModule.width, oModule.height)); |
| 581 | // if (nodeScreenTitleText1.width > nodeScreenTitleText.width) { | 555 | }, function () { }, this |
| 582 | // this.normalName.overflow = cc.Label.Overflow.CLAMP; | 556 | ); |
| 583 | // this.normalName.enableWrapText = false; | 557 | } else { |
| 584 | // this.normalName.horizontalAlign = cc.Label.HorizontalAlign.LEFT; | 558 | // cc.loader.loadRes(oModule.imageURL, cc.Texture2D, function (err, texture) { |
| 585 | // } | 559 | // node.getChildByName('Pic').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture); |
| 586 | // } | 560 | // }); |
| 561 | Network.loadImageInNativeRuntime( | ||
| 562 | Common.TOPDRAW_IMAGE_SERVER + oModule.imageURL, null, | ||
| 563 | function (texture, iRequestId) { | ||
| 564 | node.getChildByName('Pic').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture); | ||
| 565 | }, function () { }, this | ||
| 566 | ); | ||
| 587 | } | 567 | } |
| 588 | } | 568 | } |
| 569 | node.getChildByName('Pic').width = oModule.width; | ||
| 570 | node.getChildByName('Pic').height = oModule.height; | ||
| 571 | node.getChildByName('Pic').getComponent(cc.Sprite).sizeMode = cc.Sprite.SizeMode.CUSTOM; | ||
| 572 | node.getComponent(cc.Widget).top = oModule.top; | ||
| 573 | node.getComponent(cc.Widget).left = oModule.left; | ||
| 574 | nodeLayout.addChild(node, 10, oModule.name); | ||
| 575 | |||
| 576 | if (!oModule.disable) { //标题不给他焦点 | ||
| 577 | //准备焦点坐标 | ||
| 578 | let fiNodeBlock = node.addComponent(FocusInfo); | ||
| 579 | fiNodeBlock.init( | ||
| 580 | oModule.tvlink, true, null, null, 1.06 //最后一个参数决定要不要放大显示 | ||
| 581 | ); | ||
| 582 | this._aFocusTargets[0][oModule.code] = node; | ||
| 583 | } | ||
| 584 | |||
| 585 | |||
| 586 | |||
| 587 | if (0 == oModule.name.indexOf("blockShadow")) { | ||
| 588 | node.opacity = 0; | ||
| 589 | } | ||
| 590 | |||
| 591 | // if (oModule.title_visible == 1) { // | ||
| 592 | // cc.find('Name', node).active = true; | ||
| 593 | // cc.find('Name', node).width = oModule.width - 10; | ||
| 594 | // cc.find('Name/NameBg', node).width = oModule.width; | ||
| 595 | // cc.find('Name/NormalName', node).width = oModule.width - 10; | ||
| 596 | // cc.find('Name/ActiveName', node).width = oModule.width - 10; | ||
| 597 | // cc.find('Name/ActiveName/NameContainer', node).width = oModule.width - 10; | ||
| 598 | // cc.find('Name/ActiveName/NameContainer/NameText', node).width = oModule.width - 10; | ||
| 599 | // this.normalName.node.width = oModule.width - 10; | ||
| 600 | // this.activeName1.string = oModule.title; | ||
| 601 | // this.activeName2.string = oModule.title; | ||
| 602 | // this.normalName.string = oModule.title; | ||
| 603 | // this.activeName1._updateRenderData(true); | ||
| 604 | // this.activeName2._updateRenderData(true); | ||
| 605 | // this.normalName._updateRenderData(true); | ||
| 606 | |||
| 607 | // //调整文字位置 | ||
| 608 | // let nodeCellName = this.node.getChildByName('Name'); | ||
| 609 | // let nodeScreenTitleText = cc.find('ActiveName/NameContainer/NameText', nodeCellName); | ||
| 610 | // let nodeScreenTitleText1 = nodeScreenTitleText.getChildByName('NameText1'); | ||
| 611 | // if (nodeScreenTitleText1.width > nodeScreenTitleText.width) { | ||
| 612 | // this.normalName.overflow = cc.Label.Overflow.CLAMP; | ||
| 613 | // this.normalName.enableWrapText = false; | ||
| 614 | // this.normalName.horizontalAlign = cc.Label.HorizontalAlign.LEFT; | ||
| 615 | // } | ||
| 616 | // } | ||
| 589 | } | 617 | } |
| 590 | nodeLayout.parent = rightNodeLayout; | ||
| 591 | // cc.log("子节点:"+nodeLayout.childrenCount); | ||
| 592 | } | 618 | } |
| 593 | |||
| 594 | // this.node.getChildByName("scrollContent").height = 2300; //这里暂且写死,scrollView有bug | ||
| 595 | // this._scrollview.scrollToTop(); | ||
| 596 | } catch (error) { | ||
| 597 | cc.log("Business Exception:Get getRightRecommendRequest..." + error); | ||
| 598 | } | 619 | } |
| 599 | }, | 620 | nodeLayout.parent = rightNodeLayout; |
| 600 | function (strResponse) { | 621 | // cc.log("子节点:"+nodeLayout.childrenCount); |
| 601 | cc.log("Business Error:Get getRightRecommendRequest..." + strResponse); | 622 | } |
| 602 | }, this, "uuid"); | 623 | |
| 624 | // this.node.getChildByName("scrollContent").height = 2300; //这里暂且写死,scrollView有bug | ||
| 625 | // this._scrollview.scrollToTop(); | ||
| 626 | } catch (error) { | ||
| 627 | cc.log("Business Exception:Get getRightRecommendRequest..." + error); | ||
| 628 | } | ||
| 629 | // }, | ||
| 630 | // function (strResponse) { | ||
| 631 | // cc.log("Business Error:Get getRightRecommendRequest..." + strResponse); | ||
| 632 | // }, this, "uuid"); | ||
| 603 | }, | 633 | }, |
| 604 | 634 | ||
| 605 | recoverFocusPath: function () { | 635 | recoverFocusPath: function () { |
| 606 | if (this._oSceneContext._iCurrentLeftIndex == 1) { | 636 | if (this._oSceneContext._iCurrentLeftIndex == 1) { |
| 607 | if (this._oSceneContext._iPageIndex == 1) { | 637 | if (this._oSceneContext._iPageIndex == 1) { |
| 608 | this.scheduleOnce(()=>{ | 638 | this.scheduleOnce(() => { |
| 609 | let fiFocusTarget = cc.find(this._oSceneContext.focusPath, this.node).getComponent(FocusInfo); | 639 | let fiFocusTarget = cc.find(this._oSceneContext.focusPath, this.node).getComponent(FocusInfo); |
| 610 | this._cFocus.flyFocus(this._fiCurrentFocus, fiFocusTarget, Common.MOVE_DIRECTION_DOWN, null, null); | 640 | this._cFocus.flyFocus(this._fiCurrentFocus, fiFocusTarget, Common.MOVE_DIRECTION_DOWN, null, null); |
| 611 | return; | 641 | return; |
| 612 | },0) | 642 | }, 0) |
| 613 | } | 643 | } |
| 614 | let height = this._aBgHeight[this._oSceneContext._iPageIndex - 1] || 0; //-1,打补丁:解决回退回来页面对不上的bug | 644 | let height = this._aBgHeight[this._oSceneContext._iPageIndex - 1] || 0; //-1,打补丁:解决回退回来页面对不上的bug |
| 615 | this.onScrollViewScrollStart(); | 645 | this.onScrollViewScrollStart(); |
| ... | @@ -978,34 +1008,36 @@ cc.Class({ | ... | @@ -978,34 +1008,36 @@ cc.Class({ |
| 978 | iTargetTopUp = fiFocusTarget.node.getParent().getComponent(cc.Widget).top; | 1008 | iTargetTopUp = fiFocusTarget.node.getParent().getComponent(cc.Widget).top; |
| 979 | } | 1009 | } |
| 980 | // cc.log("目标节点: "+fiCurrentFocus.node.name); | 1010 | // cc.log("目标节点: "+fiCurrentFocus.node.name); |
| 981 | let iCurrentFloorBottomUp = this._aBgHeight[this._oSceneContext._iPageIndex - 1] || 0;//当前楼层底部高度 | 1011 | if (this._aBgHeight && this._aBgHeight.length > 0) { |
| 982 | // cc.log(iCurrentFloorBottomUp + "目标节点的高度:" + iTargetTopUp); | 1012 | let iCurrentFloorBottomUp = this._aBgHeight[this._oSceneContext._iPageIndex - 1] || 0;//当前楼层底部高度 |
| 983 | if (this._bIsScrollViewMoving) { | 1013 | // cc.log(iCurrentFloorBottomUp + "目标节点的高度:" + iTargetTopUp); |
| 984 | return; | 1014 | if (this._bIsScrollViewMoving) { |
| 985 | } | ||
| 986 | if (iTargetTopUp < iCurrentFloorBottomUp && fiCurrentFocus.node.name.indexOf("NaviCell") == -1) { | ||
| 987 | if (this._oSceneContext._iPageIndex > 1) { | ||
| 988 | //---------------隐藏焦点0.6秒,就看不到焦点框长时间的跳转------------------ | ||
| 989 | this._cFocus.hide(); | ||
| 990 | setTimeout(function () { | ||
| 991 | if (0 != fiFocusTarget.node.getName().indexOf('view_pager_label')) //补丁:跳到view_pager_label列表不允许显示焦点框 | ||
| 992 | this._cFocus.show(); | ||
| 993 | this.onScrollViewScrollEnd(); | ||
| 994 | }.bind(this), 600); | ||
| 995 | //---------------------------------------------------------------------- | ||
| 996 | this._oSceneContext._iPageIndex--; | ||
| 997 | let height = this._aBgHeight[this._oSceneContext._iPageIndex - 1] || 0; //520,750,1177,1463,1737,2119,2239 | ||
| 998 | this.onScrollViewScrollStart(); | ||
| 999 | this._scrollview.scrollToOffset(cc.v2(0, height), 0.5); | ||
| 1000 | // cc.log("滚动到:" + height); | ||
| 1001 | this.scheduleOnce(function () { | ||
| 1002 | this.keyDownDirection(Common.MOVE_DIRECTION_UP); | ||
| 1003 | }, 0.3); | ||
| 1004 | // setTimeout(function () { | ||
| 1005 | // this.keyDownDirection(Common.MOVE_DIRECTION_UP); | ||
| 1006 | // }.bind(this), 300); | ||
| 1007 | return; | 1015 | return; |
| 1008 | } | 1016 | } |
| 1017 | if (iTargetTopUp < iCurrentFloorBottomUp && fiCurrentFocus.node.name.indexOf("NaviCell") == -1) { | ||
| 1018 | if (this._oSceneContext._iPageIndex > 1) { | ||
| 1019 | //---------------隐藏焦点0.6秒,就看不到焦点框长时间的跳转------------------ | ||
| 1020 | this._cFocus.hide(); | ||
| 1021 | setTimeout(function () { | ||
| 1022 | if (0 != fiFocusTarget.node.getName().indexOf('view_pager_label')) //补丁:跳到view_pager_label列表不允许显示焦点框 | ||
| 1023 | this._cFocus.show(); | ||
| 1024 | this.onScrollViewScrollEnd(); | ||
| 1025 | }.bind(this), 600); | ||
| 1026 | //---------------------------------------------------------------------- | ||
| 1027 | this._oSceneContext._iPageIndex--; | ||
| 1028 | let height = this._aBgHeight[this._oSceneContext._iPageIndex - 1] || 0; //520,750,1177,1463,1737,2119,2239 | ||
| 1029 | this.onScrollViewScrollStart(); | ||
| 1030 | this._scrollview.scrollToOffset(cc.v2(0, height), 0.5); | ||
| 1031 | // cc.log("滚动到:" + height); | ||
| 1032 | this.scheduleOnce(function () { | ||
| 1033 | this.keyDownDirection(Common.MOVE_DIRECTION_UP); | ||
| 1034 | }, 0.3); | ||
| 1035 | // setTimeout(function () { | ||
| 1036 | // this.keyDownDirection(Common.MOVE_DIRECTION_UP); | ||
| 1037 | // }.bind(this), 300); | ||
| 1038 | return; | ||
| 1039 | } | ||
| 1040 | } | ||
| 1009 | } | 1041 | } |
| 1010 | this.keyDownDirection(Common.MOVE_DIRECTION_UP); | 1042 | this.keyDownDirection(Common.MOVE_DIRECTION_UP); |
| 1011 | break; | 1043 | break; |
| ... | @@ -1041,34 +1073,36 @@ cc.Class({ | ... | @@ -1041,34 +1073,36 @@ cc.Class({ |
| 1041 | } else if (fiFocusTarget.node.getParent().getComponent(cc.Widget)) { | 1073 | } else if (fiFocusTarget.node.getParent().getComponent(cc.Widget)) { |
| 1042 | iTargetTop = fiFocusTarget.node.getParent().getComponent(cc.Widget).top; | 1074 | iTargetTop = fiFocusTarget.node.getParent().getComponent(cc.Widget).top; |
| 1043 | } | 1075 | } |
| 1044 | let iCurrentFloorBottom = this._aBgHeight[this._oSceneContext._iPageIndex - 1] || 0;//当前楼层底部高度 | 1076 | if (this._aBgHeight && this._aBgHeight.length > 0) { |
| 1045 | // cc.log(iCurrentFloorBottom + "目标节点的高度:" + iTargetTop + "::" + this._oSceneContext._iPageIndex); | 1077 | let iCurrentFloorBottom = this._aBgHeight[this._oSceneContext._iPageIndex - 1] || 0;//当前楼层底部高度 |
| 1046 | if (this._bIsScrollViewMoving) { | 1078 | // cc.log(iCurrentFloorBottom + "目标节点的高度:" + iTargetTop + "::" + this._oSceneContext._iPageIndex); |
| 1047 | return; | 1079 | if (this._bIsScrollViewMoving) { |
| 1048 | } | ||
| 1049 | if (iTargetTop > iCurrentFloorBottom && fiCurrentFocus.node.name.indexOf("NaviCell") == -1 && fiCurrentFocus.node.name.indexOf("TopCell") == -1) { | ||
| 1050 | if (this._oSceneContext._iPageIndex < this._aBgHeight.length - 1) { | ||
| 1051 | //---------------隐藏焦点0.6秒,就看不到焦点框长时间的跳转------------------ | ||
| 1052 | this._cFocus.hide(); | ||
| 1053 | setTimeout(function () { | ||
| 1054 | if (0 != fiFocusTarget.node.name.indexOf("backToTop")) | ||
| 1055 | this._cFocus.show(); | ||
| 1056 | this.onScrollViewScrollEnd(); | ||
| 1057 | }.bind(this), 600); | ||
| 1058 | //---------------------------------------------------------------------- | ||
| 1059 | let height = this._aBgHeight[this._oSceneContext._iPageIndex] || 0; //520,750,1177,1463,1737,2119,2239 | ||
| 1060 | this.onScrollViewScrollStart(); | ||
| 1061 | this._scrollview.scrollToOffset(cc.v2(0, height), 0.5); | ||
| 1062 | // cc.log("滚动到:"+height); | ||
| 1063 | this._oSceneContext._iPageIndex++; | ||
| 1064 | this.scheduleOnce(function () { | ||
| 1065 | this.keyDownDirection(Common.MOVE_DIRECTION_DOWN); | ||
| 1066 | }, 0.3); | ||
| 1067 | // setTimeout(function () { | ||
| 1068 | // this.keyDownDirection(Common.MOVE_DIRECTION_DOWN); | ||
| 1069 | // }.bind(this), 300); | ||
| 1070 | return; | 1080 | return; |
| 1071 | } | 1081 | } |
| 1082 | if (iTargetTop > iCurrentFloorBottom && fiCurrentFocus.node.name.indexOf("NaviCell") == -1 && fiCurrentFocus.node.name.indexOf("TopCell") == -1) { | ||
| 1083 | if (this._oSceneContext._iPageIndex < this._aBgHeight.length - 1) { | ||
| 1084 | //---------------隐藏焦点0.6秒,就看不到焦点框长时间的跳转------------------ | ||
| 1085 | this._cFocus.hide(); | ||
| 1086 | setTimeout(function () { | ||
| 1087 | if (0 != fiFocusTarget.node.name.indexOf("backToTop")) | ||
| 1088 | this._cFocus.show(); | ||
| 1089 | this.onScrollViewScrollEnd(); | ||
| 1090 | }.bind(this), 600); | ||
| 1091 | //---------------------------------------------------------------------- | ||
| 1092 | let height = this._aBgHeight[this._oSceneContext._iPageIndex] || 0; //520,750,1177,1463,1737,2119,2239 | ||
| 1093 | this.onScrollViewScrollStart(); | ||
| 1094 | this._scrollview.scrollToOffset(cc.v2(0, height), 0.5); | ||
| 1095 | // cc.log("滚动到:"+height); | ||
| 1096 | this._oSceneContext._iPageIndex++; | ||
| 1097 | this.scheduleOnce(function () { | ||
| 1098 | this.keyDownDirection(Common.MOVE_DIRECTION_DOWN); | ||
| 1099 | }, 0.3); | ||
| 1100 | // setTimeout(function () { | ||
| 1101 | // this.keyDownDirection(Common.MOVE_DIRECTION_DOWN); | ||
| 1102 | // }.bind(this), 300); | ||
| 1103 | return; | ||
| 1104 | } | ||
| 1105 | } | ||
| 1072 | } | 1106 | } |
| 1073 | this.keyDownDirection(Common.MOVE_DIRECTION_DOWN); | 1107 | this.keyDownDirection(Common.MOVE_DIRECTION_DOWN); |
| 1074 | break; | 1108 | break; |
| ... | @@ -1277,14 +1311,16 @@ cc.Class({ | ... | @@ -1277,14 +1311,16 @@ cc.Class({ |
| 1277 | 1311 | ||
| 1278 | this._oSceneContext._iCurrentLeftIndex = iIndex; | 1312 | this._oSceneContext._iCurrentLeftIndex = iIndex; |
| 1279 | this.scheduleOnce(function () { | 1313 | this.scheduleOnce(function () { |
| 1280 | // this.requestMediaList(1); //重新渲染CategoryList | ||
| 1281 | this.getSimulateRequest(); | 1314 | this.getSimulateRequest(); |
| 1282 | }, 0); | 1315 | }, 0); |
| 1283 | // this.renderCategoryList(1); | ||
| 1284 | 1316 | ||
| 1285 | var rightNodeLayout = this.targetAry[1].target; | 1317 | var rightNodeLayout = this.targetAry[1].target; |
| 1286 | 1318 | ||
| 1287 | if (iIndex == 1) { | 1319 | if (iIndex == 1) { |
| 1320 | this.scheduleOnce(function () { | ||
| 1321 | // this.getRightRecommendRequestData(); | ||
| 1322 | }, 0); | ||
| 1323 | |||
| 1288 | cc.find("scrollContent/ViewPagerArea", this.node).active = true; | 1324 | cc.find("scrollContent/ViewPagerArea", this.node).active = true; |
| 1289 | cc.find("scrollContent/BlockShadow", this.node).active = true; | 1325 | cc.find("scrollContent/BlockShadow", this.node).active = true; |
| 1290 | // cc.find("scrollContent/CategoryListRecommendLayout", this.node).active = false; | 1326 | // cc.find("scrollContent/CategoryListRecommendLayout", this.node).active = false; |
| ... | @@ -1513,11 +1549,11 @@ cc.Class({ | ... | @@ -1513,11 +1549,11 @@ cc.Class({ |
| 1513 | // this.panel.byteProgress.progress = 0; | 1549 | // this.panel.byteProgress.progress = 0; |
| 1514 | 1550 | ||
| 1515 | this._bAbleHotUpdate = true; | 1551 | this._bAbleHotUpdate = true; |
| 1516 | this._iSceneStatus = 1; //焦点框跳转层级 | 1552 | // this._iSceneStatus = 1; //焦点框跳转层级 |
| 1517 | cc.find("update", this.node).active = true; //显示出来更新面板 | 1553 | // cc.find("update", this.node).active = true; //显示出来更新面板 |
| 1518 | this._cFocus.show(); | 1554 | // this._cFocus.show(); |
| 1519 | let fiHotUpdateBtn = cc.find('update/update_panel/update_btn', this.node).getComponent(FocusInfo); //热更新按钮 | 1555 | // let fiHotUpdateBtn = cc.find('update/update_panel/update_btn', this.node).getComponent(FocusInfo); //热更新按钮 |
| 1520 | this._cFocus.flyFocus(this._fiCurrentFocus, fiHotUpdateBtn, Common.MOVE_DIRECTION_RIGHT, null, null); | 1556 | // this._cFocus.flyFocus(this._fiCurrentFocus, fiHotUpdateBtn, Common.MOVE_DIRECTION_RIGHT, null, null); |
| 1521 | 1557 | ||
| 1522 | break; | 1558 | break; |
| 1523 | default: | 1559 | default: |
| ... | @@ -1528,9 +1564,9 @@ cc.Class({ | ... | @@ -1528,9 +1564,9 @@ cc.Class({ |
| 1528 | this._checkListener = null; | 1564 | this._checkListener = null; |
| 1529 | this._updating = false; | 1565 | this._updating = false; |
| 1530 | 1566 | ||
| 1531 | // if (this._bAbleHotUpdate) { | 1567 | if (this._bAbleHotUpdate) { |
| 1532 | // this.hotUpdate(); //放在这里可以静默升级 | 1568 | this.hotUpdate(); //放在这里可以静默升级 |
| 1533 | // } | 1569 | } |
| 1534 | }, | 1570 | }, |
| 1535 | 1571 | ||
| 1536 | hotUpdate: function () { | 1572 | hotUpdate: function () { | ... | ... |
| ... | @@ -49,8 +49,8 @@ | ... | @@ -49,8 +49,8 @@ |
| 49 | }, | 49 | }, |
| 50 | "_contentSize": { | 50 | "_contentSize": { |
| 51 | "__type__": "cc.Size", | 51 | "__type__": "cc.Size", |
| 52 | "width": 270, | 52 | "width": 221, |
| 53 | "height": 192 | 53 | "height": 176 |
| 54 | }, | 54 | }, |
| 55 | "_anchorPoint": { | 55 | "_anchorPoint": { |
| 56 | "__type__": "cc.Vec2", | 56 | "__type__": "cc.Vec2", |
| ... | @@ -128,8 +128,8 @@ | ... | @@ -128,8 +128,8 @@ |
| 128 | }, | 128 | }, |
| 129 | "_contentSize": { | 129 | "_contentSize": { |
| 130 | "__type__": "cc.Size", | 130 | "__type__": "cc.Size", |
| 131 | "width": 270, | 131 | "width": 221, |
| 132 | "height": 152 | 132 | "height": 136 |
| 133 | }, | 133 | }, |
| 134 | "_anchorPoint": { | 134 | "_anchorPoint": { |
| 135 | "__type__": "cc.Vec2", | 135 | "__type__": "cc.Vec2", |
| ... | @@ -812,7 +812,7 @@ | ... | @@ -812,7 +812,7 @@ |
| 812 | }, | 812 | }, |
| 813 | "_contentSize": { | 813 | "_contentSize": { |
| 814 | "__type__": "cc.Size", | 814 | "__type__": "cc.Size", |
| 815 | "width": 270, | 815 | "width": 221, |
| 816 | "height": 40 | 816 | "height": 40 |
| 817 | }, | 817 | }, |
| 818 | "_anchorPoint": { | 818 | "_anchorPoint": { |
| ... | @@ -825,7 +825,7 @@ | ... | @@ -825,7 +825,7 @@ |
| 825 | "ctor": "Float32Array", | 825 | "ctor": "Float32Array", |
| 826 | "array": [ | 826 | "array": [ |
| 827 | 0, | 827 | 0, |
| 828 | -76, | 828 | -68, |
| 829 | 0, | 829 | 0, |
| 830 | 0, | 830 | 0, |
| 831 | 0, | 831 | 0, |
| ... | @@ -876,7 +876,7 @@ | ... | @@ -876,7 +876,7 @@ |
| 876 | }, | 876 | }, |
| 877 | "_contentSize": { | 877 | "_contentSize": { |
| 878 | "__type__": "cc.Size", | 878 | "__type__": "cc.Size", |
| 879 | "width": 270, | 879 | "width": 221, |
| 880 | "height": 40 | 880 | "height": 40 |
| 881 | }, | 881 | }, |
| 882 | "_anchorPoint": { | 882 | "_anchorPoint": { |
| ... | @@ -998,7 +998,7 @@ | ... | @@ -998,7 +998,7 @@ |
| 998 | "__type__": "TypedArray", | 998 | "__type__": "TypedArray", |
| 999 | "ctor": "Float32Array", | 999 | "ctor": "Float32Array", |
| 1000 | "array": [ | 1000 | "array": [ |
| 1001 | -125, | 1001 | -100.5, |
| 1002 | 0, | 1002 | 0, |
| 1003 | 0, | 1003 | 0, |
| 1004 | 0, | 1004 | 0, |
| ... | @@ -1165,7 +1165,7 @@ | ... | @@ -1165,7 +1165,7 @@ |
| 1165 | }, | 1165 | }, |
| 1166 | "_contentSize": { | 1166 | "_contentSize": { |
| 1167 | "__type__": "cc.Size", | 1167 | "__type__": "cc.Size", |
| 1168 | "width": 270, | 1168 | "width": 221, |
| 1169 | "height": 40 | 1169 | "height": 40 |
| 1170 | }, | 1170 | }, |
| 1171 | "_anchorPoint": { | 1171 | "_anchorPoint": { |
| ... | @@ -1241,7 +1241,7 @@ | ... | @@ -1241,7 +1241,7 @@ |
| 1241 | }, | 1241 | }, |
| 1242 | "_contentSize": { | 1242 | "_contentSize": { |
| 1243 | "__type__": "cc.Size", | 1243 | "__type__": "cc.Size", |
| 1244 | "width": 270, | 1244 | "width": 221, |
| 1245 | "height": 40 | 1245 | "height": 40 |
| 1246 | }, | 1246 | }, |
| 1247 | "_anchorPoint": { | 1247 | "_anchorPoint": { |
| ... | @@ -1590,7 +1590,7 @@ | ... | @@ -1590,7 +1590,7 @@ |
| 1590 | }, | 1590 | }, |
| 1591 | "_contentSize": { | 1591 | "_contentSize": { |
| 1592 | "__type__": "cc.Size", | 1592 | "__type__": "cc.Size", |
| 1593 | "width": 250, | 1593 | "width": 200, |
| 1594 | "height": 40 | 1594 | "height": 40 |
| 1595 | }, | 1595 | }, |
| 1596 | "_anchorPoint": { | 1596 | "_anchorPoint": { |
| ... | @@ -1669,7 +1669,7 @@ | ... | @@ -1669,7 +1669,7 @@ |
| 1669 | }, | 1669 | }, |
| 1670 | "_contentSize": { | 1670 | "_contentSize": { |
| 1671 | "__type__": "cc.Size", | 1671 | "__type__": "cc.Size", |
| 1672 | "width": 250, | 1672 | "width": 200, |
| 1673 | "height": 40 | 1673 | "height": 40 |
| 1674 | }, | 1674 | }, |
| 1675 | "_anchorPoint": { | 1675 | "_anchorPoint": { |
| ... | @@ -2123,7 +2123,7 @@ | ... | @@ -2123,7 +2123,7 @@ |
| 2123 | }, | 2123 | }, |
| 2124 | "_contentSize": { | 2124 | "_contentSize": { |
| 2125 | "__type__": "cc.Size", | 2125 | "__type__": "cc.Size", |
| 2126 | "width": 250, | 2126 | "width": 200, |
| 2127 | "height": 40 | 2127 | "height": 40 |
| 2128 | }, | 2128 | }, |
| 2129 | "_anchorPoint": { | 2129 | "_anchorPoint": { | ... | ... |
| ... | @@ -173,7 +173,7 @@ public class TopdrawSDKWrapper { | ... | @@ -173,7 +173,7 @@ public class TopdrawSDKWrapper { |
| 173 | _activity.startActivity(intent); | 173 | _activity.startActivity(intent); |
| 174 | pluginLoaded = false; | 174 | pluginLoaded = false; |
| 175 | 175 | ||
| 176 | _activity.runOnUiThread(new Runnable() { //直接加载游戏,传回去进度是100 | 176 | _activity.runOnUiThread(new Runnable() { |
| 177 | @Override | 177 | @Override |
| 178 | public void run() { | 178 | public void run() { |
| 179 | singleColorView.setVisibility(View.VISIBLE); //展示单色背景,解决透明度问题 | 179 | singleColorView.setVisibility(View.VISIBLE); //展示单色背景,解决透明度问题 | ... | ... |
-
Please register or sign in to post a comment