1.修改详情页
2.优化首页
... | @@ -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.06060791015625, |
193 | 0, | 193 | 0, |
194 | 0, | 194 | 0, |
195 | 0, | 195 | 0, |
... | @@ -1228,9 +1228,7 @@ | ... | @@ -1228,9 +1228,7 @@ |
1228 | ], | 1228 | ], |
1229 | "_srcBlendFactor": 770, | 1229 | "_srcBlendFactor": 770, |
1230 | "_dstBlendFactor": 771, | 1230 | "_dstBlendFactor": 771, |
1231 | "_spriteFrame": { | 1231 | "_spriteFrame": null, |
1232 | "__uuid__": "25c3545b-49b6-40d0-928d-58a15150d9da" | ||
1233 | }, | ||
1234 | "_type": 0, | 1232 | "_type": 0, |
1235 | "_sizeMode": 0, | 1233 | "_sizeMode": 0, |
1236 | "_fillType": 0, | 1234 | "_fillType": 0, |
... | @@ -1364,9 +1362,7 @@ | ... | @@ -1364,9 +1362,7 @@ |
1364 | ], | 1362 | ], |
1365 | "_srcBlendFactor": 770, | 1363 | "_srcBlendFactor": 770, |
1366 | "_dstBlendFactor": 771, | 1364 | "_dstBlendFactor": 771, |
1367 | "_spriteFrame": { | 1365 | "_spriteFrame": null, |
1368 | "__uuid__": "25c3545b-49b6-40d0-928d-58a15150d9da" | ||
1369 | }, | ||
1370 | "_type": 0, | 1366 | "_type": 0, |
1371 | "_sizeMode": 0, | 1367 | "_sizeMode": 0, |
1372 | "_fillType": 0, | 1368 | "_fillType": 0, |
... | @@ -1500,9 +1496,7 @@ | ... | @@ -1500,9 +1496,7 @@ |
1500 | ], | 1496 | ], |
1501 | "_srcBlendFactor": 770, | 1497 | "_srcBlendFactor": 770, |
1502 | "_dstBlendFactor": 771, | 1498 | "_dstBlendFactor": 771, |
1503 | "_spriteFrame": { | 1499 | "_spriteFrame": null, |
1504 | "__uuid__": "25c3545b-49b6-40d0-928d-58a15150d9da" | ||
1505 | }, | ||
1506 | "_type": 0, | 1500 | "_type": 0, |
1507 | "_sizeMode": 0, | 1501 | "_sizeMode": 0, |
1508 | "_fillType": 0, | 1502 | "_fillType": 0, |
... | @@ -1636,9 +1630,7 @@ | ... | @@ -1636,9 +1630,7 @@ |
1636 | ], | 1630 | ], |
1637 | "_srcBlendFactor": 770, | 1631 | "_srcBlendFactor": 770, |
1638 | "_dstBlendFactor": 771, | 1632 | "_dstBlendFactor": 771, |
1639 | "_spriteFrame": { | 1633 | "_spriteFrame": null, |
1640 | "__uuid__": "25c3545b-49b6-40d0-928d-58a15150d9da" | ||
1641 | }, | ||
1642 | "_type": 0, | 1634 | "_type": 0, |
1643 | "_sizeMode": 0, | 1635 | "_sizeMode": 0, |
1644 | "_fillType": 0, | 1636 | "_fillType": 0, |
... | @@ -1962,15 +1954,15 @@ | ... | @@ -1962,15 +1954,15 @@ |
1962 | }, | 1954 | }, |
1963 | "_anchorPoint": { | 1955 | "_anchorPoint": { |
1964 | "__type__": "cc.Vec2", | 1956 | "__type__": "cc.Vec2", |
1965 | "x": 0.5, | 1957 | "x": 0, |
1966 | "y": 0.5 | 1958 | "y": 1 |
1967 | }, | 1959 | }, |
1968 | "_trs": { | 1960 | "_trs": { |
1969 | "__type__": "TypedArray", | 1961 | "__type__": "TypedArray", |
1970 | "ctor": "Float32Array", | 1962 | "ctor": "Float32Array", |
1971 | "array": [ | 1963 | "array": [ |
1972 | 0, | 1964 | 0, |
1973 | 0, | 1965 | -178, |
1974 | 0, | 1966 | 0, |
1975 | 0, | 1967 | 0, |
1976 | 0, | 1968 | 0, |
... | @@ -2005,9 +1997,9 @@ | ... | @@ -2005,9 +1997,9 @@ |
2005 | "alignMode": 1, | 1997 | "alignMode": 1, |
2006 | "_target": null, | 1998 | "_target": null, |
2007 | "_alignFlags": 9, | 1999 | "_alignFlags": 9, |
2008 | "_left": -100, | 2000 | "_left": 0, |
2009 | "_right": 0, | 2001 | "_right": 0, |
2010 | "_top": -100, | 2002 | "_top": 178, |
2011 | "_bottom": 0, | 2003 | "_bottom": 0, |
2012 | "_verticalCenter": 0, | 2004 | "_verticalCenter": 0, |
2013 | "_horizontalCenter": 0, | 2005 | "_horizontalCenter": 0, |
... | @@ -2262,7 +2254,7 @@ | ... | @@ -2262,7 +2254,7 @@ |
2262 | "_contentSize": { | 2254 | "_contentSize": { |
2263 | "__type__": "cc.Size", | 2255 | "__type__": "cc.Size", |
2264 | "width": 1153, | 2256 | "width": 1153, |
2265 | "height": 650 | 2257 | "height": 200 |
2266 | }, | 2258 | }, |
2267 | "_anchorPoint": { | 2259 | "_anchorPoint": { |
2268 | "__type__": "cc.Vec2", | 2260 | "__type__": "cc.Vec2", |
... | @@ -2286,7 +2278,7 @@ | ... | @@ -2286,7 +2278,7 @@ |
2286 | "ctor": "Float32Array", | 2278 | "ctor": "Float32Array", |
2287 | "array": [ | 2279 | "array": [ |
2288 | 640, | 2280 | 640, |
2289 | -955, | 2281 | -750, |
2290 | 0, | 2282 | 0, |
2291 | 0, | 2283 | 0, |
2292 | 0, | 2284 | 0, |
... | @@ -2340,7 +2332,7 @@ | ... | @@ -2340,7 +2332,7 @@ |
2340 | "_contentSize": { | 2332 | "_contentSize": { |
2341 | "__type__": "cc.Size", | 2333 | "__type__": "cc.Size", |
2342 | "width": 1200, | 2334 | "width": 1200, |
2343 | "height": 670 | 2335 | "height": 215 |
2344 | }, | 2336 | }, |
2345 | "_anchorPoint": { | 2337 | "_anchorPoint": { |
2346 | "__type__": "cc.Vec2", | 2338 | "__type__": "cc.Vec2", |
... | @@ -2410,7 +2402,7 @@ | ... | @@ -2410,7 +2402,7 @@ |
2410 | "_contentSize": { | 2402 | "_contentSize": { |
2411 | "__type__": "cc.Size", | 2403 | "__type__": "cc.Size", |
2412 | "width": 1153, | 2404 | "width": 1153, |
2413 | "height": 554 | 2405 | "height": 200 |
2414 | }, | 2406 | }, |
2415 | "_anchorPoint": { | 2407 | "_anchorPoint": { |
2416 | "__type__": "cc.Vec2", | 2408 | "__type__": "cc.Vec2", |
... | @@ -2434,7 +2426,7 @@ | ... | @@ -2434,7 +2426,7 @@ |
2434 | "ctor": "Float32Array", | 2426 | "ctor": "Float32Array", |
2435 | "array": [ | 2427 | "array": [ |
2436 | 0, | 2428 | 0, |
2437 | 0, | 2429 | 15, |
2438 | 0, | 2430 | 0, |
2439 | 0, | 2431 | 0, |
2440 | 0, | 2432 | 0, |
... | @@ -3380,7 +3372,7 @@ | ... | @@ -3380,7 +3372,7 @@ |
3380 | "_alignFlags": 1, | 3372 | "_alignFlags": 1, |
3381 | "_left": 0, | 3373 | "_left": 0, |
3382 | "_right": 0, | 3374 | "_right": 0, |
3383 | "_top": 630, | 3375 | "_top": 650, |
3384 | "_bottom": 0, | 3376 | "_bottom": 0, |
3385 | "_verticalCenter": 0, | 3377 | "_verticalCenter": 0, |
3386 | "_horizontalCenter": 0, | 3378 | "_horizontalCenter": 0, |
... | @@ -5673,30 +5665,9 @@ | ... | @@ -5673,30 +5665,9 @@ |
5673 | "_aTouchContext": [], | 5665 | "_aTouchContext": [], |
5674 | "_defaultBackScene": null, | 5666 | "_defaultBackScene": null, |
5675 | "_oFocusScaleFactorInfo": null, | 5667 | "_oFocusScaleFactorInfo": null, |
5676 | "layout_json": { | 5668 | "test_json": { |
5677 | "__uuid__": "2f979325-7c8b-45cc-99a5-30cc9c056bb1" | ||
5678 | }, | ||
5679 | "recommend_json": { | ||
5680 | "__uuid__": "d797e6d8-b99b-4992-be3f-35357c9dcd65" | 5669 | "__uuid__": "d797e6d8-b99b-4992-be3f-35357c9dcd65" |
5681 | }, | 5670 | }, |
5682 | "category_xxyz_list": { | ||
5683 | "__uuid__": "3beb596d-4dc5-414e-9751-9cbff50a0a39" | ||
5684 | }, | ||
5685 | "category_dztg_json": { | ||
5686 | "__uuid__": "9a8524c5-13e3-414a-91d7-32dcbcef16c0" | ||
5687 | }, | ||
5688 | "category_3dyx_json": { | ||
5689 | "__uuid__": "c3913569-3224-4557-aedd-a877a7c75939" | ||
5690 | }, | ||
5691 | "category_jycl_json": { | ||
5692 | "__uuid__": "25224060-4e72-44d0-9fa1-caa051cf1249" | ||
5693 | }, | ||
5694 | "category_jsby_json": { | ||
5695 | "__uuid__": "0a9757cd-35ad-43d4-8eab-9501998a4345" | ||
5696 | }, | ||
5697 | "test_category_list_recommend_json": { | ||
5698 | "__uuid__": "9d3d5ca5-5f87-4dd6-aca0-d18e2f36e990" | ||
5699 | }, | ||
5700 | "PFB_COMMON_WIDGET": { | 5671 | "PFB_COMMON_WIDGET": { |
5701 | "__uuid__": "57787725-2430-4ac3-b324-c22c08c3f074" | 5672 | "__uuid__": "57787725-2430-4ac3-b324-c22c08c3f074" |
5702 | }, | 5673 | }, | ... | ... |
... | @@ -403,6 +403,7 @@ cc.Class({ | ... | @@ -403,6 +403,7 @@ cc.Class({ |
403 | return true; | 403 | return true; |
404 | }, | 404 | }, |
405 | 405 | ||
406 | //模拟json中,count的值一定得准确,否则滑动出错 | ||
406 | loadData: function (onSuccess, onError, oScope, strResponse) { | 407 | loadData: function (onSuccess, onError, oScope, strResponse) { |
407 | var oJSONResult = JSON.parse(strResponse); | 408 | var oJSONResult = JSON.parse(strResponse); |
408 | var oHandleJson = {}; | 409 | var oHandleJson = {}; | ... | ... |
... | @@ -52,6 +52,8 @@ cc.Topdraw.TVCanvas = | ... | @@ -52,6 +52,8 @@ cc.Topdraw.TVCanvas = |
52 | _defaultBackScene: null,//每个场景Canvas都有的 默认返回场景 每个场景自己构造函数内设置值 | 52 | _defaultBackScene: null,//每个场景Canvas都有的 默认返回场景 每个场景自己构造函数内设置值 |
53 | _oFocusScaleFactorInfo: null, | 53 | _oFocusScaleFactorInfo: null, |
54 | 54 | ||
55 | _bShowExitBox: false, | ||
56 | |||
55 | }, | 57 | }, |
56 | onLoad: function () { | 58 | onLoad: function () { |
57 | 59 | ||
... | @@ -315,6 +317,7 @@ cc.Topdraw.TVCanvas = | ... | @@ -315,6 +317,7 @@ cc.Topdraw.TVCanvas = |
315 | let aSceneContext = compApplication.getSceneContext(); | 317 | let aSceneContext = compApplication.getSceneContext(); |
316 | let aSceneParameter = compApplication.getSceneParameter(); | 318 | let aSceneParameter = compApplication.getSceneParameter(); |
317 | if (aSceneParameter.length) { | 319 | if (aSceneParameter.length) { |
320 | this._bShowExitBox = false; | ||
318 | let oSceneParameter = aSceneParameter.pop(); | 321 | let oSceneParameter = aSceneParameter.pop(); |
319 | //aSceneParameter[] | 322 | //aSceneParameter[] |
320 | compApplication.setBackStatus(true); | 323 | compApplication.setBackStatus(true); |
... | @@ -354,7 +357,15 @@ cc.Topdraw.TVCanvas = | ... | @@ -354,7 +357,15 @@ cc.Topdraw.TVCanvas = |
354 | } else { | 357 | } else { |
355 | cc.log("应该退出应用才对"); | 358 | cc.log("应该退出应用才对"); |
356 | //cc.director.end(); | 359 | //cc.director.end(); |
357 | cc.game.end(); | 360 | // this.commonSimpleTip("退出应用", 1); |
361 | // cc.game.end(); | ||
362 | |||
363 | if (!this._bShowExitBox) { //弹出挽留界面 | ||
364 | this.showDetainBox(); | ||
365 | } else { | ||
366 | cc.log("退出应用!"); | ||
367 | cc.game.end(); | ||
368 | } | ||
358 | } | 369 | } |
359 | } | 370 | } |
360 | } catch (error) { | 371 | } catch (error) { |
... | @@ -926,20 +937,18 @@ cc.Topdraw.TVCanvas = | ... | @@ -926,20 +937,18 @@ cc.Topdraw.TVCanvas = |
926 | */ | 937 | */ |
927 | showDetainBox: function (fiBackend, bHideBg) { | 938 | showDetainBox: function (fiBackend, bHideBg) { |
928 | try { | 939 | try { |
940 | this._bShowExitBox = true; | ||
929 | if (this._nodeSystemPrompt) { | 941 | if (this._nodeSystemPrompt) { |
930 | this._nodeSystemPrompt.opacity = 255; | 942 | this._nodeSystemPrompt.opacity = 255; |
931 | this._iDetainBoxStatus = this._aFocusTargets.length; | 943 | if (null == this._aFocusTargets[1]) { //focus放到第二层级,避免冲突 |
932 | if (null == this._aFocusTargets[this._iDetainBoxStatus]) { | 944 | this._aFocusTargets[1] = []; |
933 | this._aFocusTargets[this._iDetainBoxStatus] = []; | ||
934 | } | 945 | } |
935 | this._aFocusTargets[this._iDetainBoxStatus]['system_confirm_btn'] = cc.find("PromptBox/Confirm", this._nodeSystemPrompt); | 946 | this._aFocusTargets[1]['system_confirm_btn'] = cc.find("PromptBox/Confirm", this._nodeSystemPrompt); |
936 | this._aFocusTargets[this._iDetainBoxStatus]['system_cancel_btn'] = cc.find("PromptBox/Cancel", this._nodeSystemPrompt); | 947 | this._aFocusTargets[1]['system_cancel_btn'] = cc.find("PromptBox/Cancel", this._nodeSystemPrompt); |
937 | this._fiBeforeDetainBox = this._fiCurrentFocus; | 948 | this._fiBeforeDetainBox = this._fiCurrentFocus; |
938 | this._fiBackend = fiBackend; | 949 | this._fiBackend = fiBackend; |
939 | this._iStatusBeforeDetainBox = this._iFocusStatus; | 950 | this._iSceneStatus = 1; |
940 | this._iFocusStatus = this._iDetainBoxStatus; | 951 | this._cFocus.flyFocus(this._fiCurrentFocus, this._aFocusTargets[1]['system_confirm_btn'].getComponent(FocusInfo), Common.MOVE_DIRECTION_UP, this._fFocusScaleFactor, null); |
941 | this._cFocus.flyFocus(this._fiCurrentFocus, this._aFocusTargets[this._iDetainBoxStatus]['system_confirm_btn'].getComponent(FocusInfo), Common.MOVE_DIRECTION_UP, this._fFocusScaleFactor, null); | ||
942 | this._bShowingDetainBox = true; | ||
943 | this._bIsLoadingPfbSystemPrompt = false; | 952 | this._bIsLoadingPfbSystemPrompt = false; |
944 | } else { | 953 | } else { |
945 | this._bIsLoadingPfbSystemPrompt = true; | 954 | this._bIsLoadingPfbSystemPrompt = true; |
... | @@ -974,17 +983,18 @@ cc.Topdraw.TVCanvas = | ... | @@ -974,17 +983,18 @@ cc.Topdraw.TVCanvas = |
974 | hideDetainBox: function () { | 983 | hideDetainBox: function () { |
975 | try { | 984 | try { |
976 | this._nodeSystemPrompt.opacity = 0; | 985 | this._nodeSystemPrompt.opacity = 0; |
977 | delete this._aFocusTargets[this._iDetainBoxStatus]['system_confirm_btn']; | 986 | delete this._aFocusTargets[1]['system_confirm_btn']; |
978 | delete this._aFocusTargets[this._iDetainBoxStatus]['system_cancel_btn']; | 987 | delete this._aFocusTargets[1]['system_cancel_btn']; |
979 | this._iFocusStatus = this._iStatusBeforeDetainBox; | 988 | this._iSceneStatus = 0; |
980 | let iX = Common.SCREEN_WIDTH / 2 + Common.getX(this._fiBeforeDetainBox.node) - this._fiBeforeDetainBox.node.width / 2; | 989 | let iX = Common.SCREEN_WIDTH / 2 + Common.getX(this._fiBeforeDetainBox.node) - this._fiBeforeDetainBox.node.width / 2; |
981 | let iY = Common.SCREEN_HEIGHT / 2 - Common.getY(this._fiBeforeDetainBox.node) + this._fiBeforeDetainBox.node.height / 2; | 990 | let iY = Common.SCREEN_HEIGHT / 2 - Common.getY(this._fiBeforeDetainBox.node) + this._fiBeforeDetainBox.node.height / 2; |
991 | cc.log("记忆焦点:"+this._fiBeforeDetainBox.node.name); | ||
982 | if (this._fiBeforeDetainBox.getEnable() && iX >= 0 && iX <= Common.SCREEN_WIDTH && iY >= 0 && iY <= Common.SCREEN_HEIGHT + 50) {//这里是考虑给播放元素设置了虚拟位置 | 992 | if (this._fiBeforeDetainBox.getEnable() && iX >= 0 && iX <= Common.SCREEN_WIDTH && iY >= 0 && iY <= Common.SCREEN_HEIGHT + 50) {//这里是考虑给播放元素设置了虚拟位置 |
983 | this._cFocus.flyFocus(this._fiCurrentFocus, this._fiBeforeDetainBox, Common.MOVE_DIRECTION_UP, this._fFocusScaleFactor, null); | 993 | this._cFocus.flyFocus(this._fiCurrentFocus, this._fiBeforeDetainBox, Common.MOVE_DIRECTION_UP, this._fFocusScaleFactor, null); |
984 | } else { | 994 | } else { |
985 | this._cFocus.flyFocus(this._fiCurrentFocus, this._fiBackend, Common.MOVE_DIRECTION_UP, this._fFocusScaleFactor, null); | 995 | this._cFocus.flyFocus(this._fiCurrentFocus, this._fiBackend, Common.MOVE_DIRECTION_UP, this._fFocusScaleFactor, null); |
986 | } | 996 | } |
987 | this._bShowingDetainBox = false; | 997 | this._bShowExitBox = false; |
988 | } catch (error) { | 998 | } catch (error) { |
989 | if (cc.sys.isNative) { | 999 | if (cc.sys.isNative) { |
990 | jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "logInSceneI", "(Ljava/lang/String;)V", "hideDetainBox Error in TVCanvas==>" + error); | 1000 | jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "logInSceneI", "(Ljava/lang/String;)V", "hideDetainBox Error in TVCanvas==>" + error); | ... | ... |
... | @@ -61,10 +61,16 @@ cc.Class({ | ... | @@ -61,10 +61,16 @@ cc.Class({ |
61 | // self.pic.spriteFrame = new cc.SpriteFrame(texture); | 61 | // self.pic.spriteFrame = new cc.SpriteFrame(texture); |
62 | // }, null, this | 62 | // }, null, this |
63 | // ); | 63 | // ); |
64 | cc.log("categoryList..."+oData.image[0].fileUrl); | 64 | // cc.log("categoryList..."+oData.image[0].fileUrl); |
65 | cc.loader.loadRes(oData.image[0].fileUrl, cc.Texture2D, function (err, texture) { | 65 | // cc.loader.loadRes(oData.image[0].fileUrl, cc.Texture2D, function (err, texture) { |
66 | self.pic.spriteFrame = new cc.SpriteFrame(texture); | 66 | // self.pic.spriteFrame = new cc.SpriteFrame(texture); |
67 | }); | 67 | // }); |
68 | Network.loadImageInNativeRuntime( | ||
69 | Common.TOPDRAW_IMAGE_SERVER + oData.image[0].fileUrl, null, | ||
70 | function (texture, iRequestId) { | ||
71 | self.pic.spriteFrame = new cc.SpriteFrame(texture); | ||
72 | }, function () { }, this | ||
73 | ); | ||
68 | } | 74 | } |
69 | // cc.log("category list cell location: "+oData.image[0].fileUrl); | 75 | // cc.log("category list cell location: "+oData.image[0].fileUrl); |
70 | this.node.getComponent(FocusInfo).setTVLink(oData.tvlink); | 76 | this.node.getComponent(FocusInfo).setTVLink(oData.tvlink); | ... | ... |
... | @@ -23,34 +23,41 @@ cc.Class({ | ... | @@ -23,34 +23,41 @@ cc.Class({ |
23 | this.node.getChildByName('Pic').height = data.height; | 23 | this.node.getChildByName('Pic').height = data.height; |
24 | if (data.imageURL) { | 24 | if (data.imageURL) { |
25 | var self = this; | 25 | var self = this; |
26 | cc.loader.loadRes(data.imageURL, cc.Texture2D, function (err, texture) { | 26 | // cc.loader.loadRes(data.imageURL, cc.Texture2D, function (err, texture) { |
27 | if (strCellName == "topNavi") { | 27 | // if (strCellName == "topNavi") { |
28 | self.pic.spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, data.width, data.height)); | 28 | // self.pic.spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, data.width, data.height)); |
29 | if (i == iCurrentIndex) { | 29 | // if (i == iCurrentIndex) { |
30 | self.pic.spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, data.height, data.width, data.height)); | 30 | // self.pic.spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, data.height, data.width, data.height)); |
31 | } | ||
32 | } else { | ||
33 | self.pic.spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, data.width, data.height)); | ||
34 | } | ||
35 | // if (null != funCallback && typeof funCallback == 'function') { | ||
36 | // funCallback.call(); | ||
37 | // } | ||
38 | }); | ||
39 | // Network.loadImageInNativeRuntime( | ||
40 | // Common.TOPDRAW_IMAGE_SERVER_EDU + data.imageURL, | ||
41 | // function (texture) { | ||
42 | // self.pic.spriteFrame = new cc.SpriteFrame(texture,cc.rect(0,0,self.node.width,self.node.height)); | ||
43 | |||
44 | // if (null != funCallback && typeof funCallback == 'function') { | ||
45 | // funCallback.call(); | ||
46 | // } | 31 | // } |
47 | // }, null, this | 32 | // } else { |
48 | // ); | 33 | // self.pic.spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, data.width, data.height)); |
49 | 34 | // } | |
35 | // // if (null != funCallback && typeof funCallback == 'function') { | ||
36 | // // funCallback.call(); | ||
37 | // // } | ||
38 | // }); | ||
50 | 39 | ||
40 | Network.loadImageInNativeRuntime( | ||
41 | Common.TOPDRAW_IMAGE_SERVER + data.imageURL | ||
42 | , null, | ||
43 | function (texture, iRequestId) { | ||
44 | if (strCellName == "topNavi") { | ||
45 | self.pic.spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, data.width, data.height)); | ||
46 | if (i == iCurrentIndex) { | ||
47 | self.pic.spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, data.height, data.width, data.height)); | ||
48 | } | ||
49 | } else { | ||
50 | self.pic.spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, data.width, data.height)); | ||
51 | } | ||
52 | }, | ||
53 | function () { | ||
54 | |||
55 | }, | ||
56 | this | ||
57 | ); | ||
51 | } | 58 | } |
52 | 59 | ||
53 | if (strCellName == "topNavi" && i>0) { | 60 | if (strCellName == "topNavi" && i > 0) { |
54 | this.node.getComponent(cc.Widget).top = data.top - data.height / 2; | 61 | this.node.getComponent(cc.Widget).top = data.top - data.height / 2; |
55 | } else { | 62 | } else { |
56 | this.node.getComponent(cc.Widget).top = data.top; | 63 | this.node.getComponent(cc.Widget).top = data.top; | ... | ... |
... | @@ -10,6 +10,7 @@ cc.Class({ | ... | @@ -10,6 +10,7 @@ cc.Class({ |
10 | properties: { | 10 | properties: { |
11 | id: 0, | 11 | id: 0, |
12 | pic: cc.Sprite, | 12 | pic: cc.Sprite, |
13 | mark: cc.Sprite, | ||
13 | activeName1: cc.Label, | 14 | activeName1: cc.Label, |
14 | activeName2: cc.Label, | 15 | activeName2: cc.Label, |
15 | normalName: cc.Label, | 16 | normalName: cc.Label, |
... | @@ -25,7 +26,8 @@ cc.Class({ | ... | @@ -25,7 +26,8 @@ cc.Class({ |
25 | 26 | ||
26 | }, | 27 | }, |
27 | 28 | ||
28 | render(oData, iRecordIndex) { | 29 | render(oData, iRecordIndex, i) { |
30 | var self = this; | ||
29 | this.activeName1.string = oData.name; | 31 | this.activeName1.string = oData.name; |
30 | this.activeName2.string = oData.name; | 32 | this.activeName2.string = oData.name; |
31 | this.normalName.string = oData.name; | 33 | this.normalName.string = oData.name; |
... | @@ -33,6 +35,10 @@ cc.Class({ | ... | @@ -33,6 +35,10 @@ cc.Class({ |
33 | 35 | ||
34 | this.node.getChildByName("Normal").active = true; | 36 | this.node.getChildByName("Normal").active = true; |
35 | 37 | ||
38 | cc.loader.loadRes("Main/top" + (i + 1), cc.Texture2D, function (err, texture) { | ||
39 | self.mark.spriteFrame = new cc.SpriteFrame(texture); | ||
40 | }); | ||
41 | |||
36 | // this.activeName1._updateRenderData(true); | 42 | // this.activeName1._updateRenderData(true); |
37 | // this.activeName2._updateRenderData(true); | 43 | // this.activeName2._updateRenderData(true); |
38 | // this.normalName._updateRenderData(true); | 44 | // this.normalName._updateRenderData(true); | ... | ... |

64.3 KB

65.3 KB

55.6 KB

57.5 KB

55.8 KB

64.3 KB

57.7 KB

46 KB

60.6 KB

56.3 KB

56.2 KB

60.5 KB

52.7 KB

52 KB

63.8 KB

68.5 KB

64.2 KB

59.6 KB

44.2 KB

65.4 KB

113 KB

61.5 KB

61.5 KB

62.8 KB

63.1 KB

24 KB

77.2 KB

53.5 KB

15.1 KB

188 Bytes

26 KB

26.9 KB

26.4 KB

25.8 KB

24.6 KB

2.08 KB

44.5 KB

59.6 KB

52 KB

63.8 KB

63.1 KB

64.3 KB

56.3 KB

9.7 KB

49.9 KB

47.1 KB

76.5 KB

21.9 KB

3.68 KB

8.81 KB

7.64 KB

7.3 KB

8.74 KB

7.41 KB

8.48 KB

115 KB

83.3 KB

105 KB

106 KB

50.2 KB

49.3 KB

23.6 KB

46.5 KB

53.5 KB

48.9 KB

14.6 KB

12.2 KB

10.3 KB

14.2 KB

1.3 KB

2.5 KB

3.94 KB

3.35 KB

3.87 KB

3.95 KB

16.6 KB

3.45 KB

9.34 KB

2.47 KB

2.77 KB

7.38 KB

7.14 KB

18.9 KB

17.6 KB

19.1 KB

18.5 KB

18.5 KB

19.1 KB

17.8 KB

3.42 KB

113 KB

102 KB

115 KB

65.3 KB

55.6 KB

64.3 KB

1.37 KB

1.8 KB

1.59 KB

1.82 KB

1.59 KB

1.52 KB

1.71 KB

1.73 KB

1.78 KB

1.72 KB

1.85 KB

1.78 KB

48.9 KB

53.5 KB

56.4 KB

53.9 KB

60.7 KB

40.4 KB

51.5 KB

21.3 KB

75.9 KB

43.9 KB
-
Please register or sign in to post a comment