![初中道德與法治七年級下冊在集體中成長道德與法治-憧憬美好集體-周欣媛_第1頁](http://file4.renrendoc.com/view/d76a34e4eb962e62ee8a80929f7e978c/d76a34e4eb962e62ee8a80929f7e978c1.gif)
![初中道德與法治七年級下冊在集體中成長道德與法治-憧憬美好集體-周欣媛_第2頁](http://file4.renrendoc.com/view/d76a34e4eb962e62ee8a80929f7e978c/d76a34e4eb962e62ee8a80929f7e978c2.gif)
![初中道德與法治七年級下冊在集體中成長道德與法治-憧憬美好集體-周欣媛_第3頁](http://file4.renrendoc.com/view/d76a34e4eb962e62ee8a80929f7e978c/d76a34e4eb962e62ee8a80929f7e978c3.gif)
![初中道德與法治七年級下冊在集體中成長道德與法治-憧憬美好集體-周欣媛_第4頁](http://file4.renrendoc.com/view/d76a34e4eb962e62ee8a80929f7e978c/d76a34e4eb962e62ee8a80929f7e978c4.gif)
![初中道德與法治七年級下冊在集體中成長道德與法治-憧憬美好集體-周欣媛_第5頁](http://file4.renrendoc.com/view/d76a34e4eb962e62ee8a80929f7e978c/d76a34e4eb962e62ee8a80929f7e978c5.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
this.widgetTable.Button_close:addTouchEventListener(close_Clicked) end this.widgetTable.Image_ytime=tolua.cast(UIHelper:seekWidgetByName(this.widgetTable.Image_bg,"Image_ytime"),"ImageView") this.widgetTable.Image_ytime:loadTexture(imagePath.."pic_yy.png") this.widgetTable.Image_cue1=tolua.cast(UIHelper:seekWidgetByName(this.widgetTable.Image_bg,"Image_cue1"),"ImageView") this.widgetTable.Image_cue1:loadTexture(imagePath.."box_yyy.png") this.widgetTable.Image_cue2=tolua.cast(UIHelper:seekWidgetByName(this.widgetTable.Image_bg,"Image_cue2"),"ImageView") this.widgetTable.Image_cue2:loadTexture(imagePath.."box_ts.png") this.widgetTable.Button_shake=tolua.cast(UIHelper:seekWidgetByName(this.widgetTable.Image_bg,"Button_shake"),"Button") this.widgetTable.Button_shake:loadTextures(imagePath.."btn_kscj.png","","") localfunctionshake_Clicked(sender,eventType) ifeventType==2then Log.d("shake_Clicked") this.sendMsgToCtrl(9,11) this.shakeshake() endend ifthis.widgetTable.Button_shakethen this.widgetTable.Button_shake:addTouchEventListener(shake_Clicked) end this.widgetTable.Button_gift=tolua.cast(UIHelper:seekWidgetByName(this.widgetTable.Image_bg,"Button_gift"),"Button") localfunctiongift_Clicked(sender,eventType) ifeventType==2then Log.d("gift_Clicked") this.sendMsgToCtrl(9,14) this.giftPanelshow() endend ifthis.widgetTable.Button_giftthen this.widgetTable.Button_gift:addTouchEventListener(gift_Clicked) end --Image_ytimeChildren this.widgetTable.Label_time1=tolua.cast(UIHelper:seekWidgetByName(this.widgetTable.Image_ytime,"Label_time1"),"Label") UITools.setGameFont(this.widgetTable.Label_time1,"FZCuYuan-M03S","fzcyt.ttf") --Button_shakeChildren this.widgetTable.Label_shake=tolua.cast(UIHelper:seekWidgetByName(this.widgetTable.Button_shake,"Label_shake"),"Label") this.accelerate=Accelerate.new(layerColor) this.hbShow() UITools.setGameFont(this.widgetTable.mainWidget,"FZCuYuan-M03S","fzcyt.ttf") this.canupdate=true --test --this.rockcount=0endfunctionthis.removeLayer() Log.i("PokerShakePanelremoveLayer") ifthis.widgetTablethen this.widgetTable={} end ifthis.dataTablethen this.dataTable={} end ifthis.mainLayerthen this.mainLayer=nil endendfunctionthis.updateWithShowData(showdata) Log.i("PokerShakePanelupdateWithShowData") ifnotthis.mainLayerthen Log.w("PokerShakePanelmainLayerisnotready") return end ifnotshowdatathen Log.w("PokerShakePanelshowdataisnotready") return else this.dataTable.showData=showdata ifthis.canupdatethen this.setShakePanel(1) end PLTable.print(showdata,"PokerShakePanelshowdata") endendfunctionthis.show(showdata) Log.i("PokerShakePanelshow") ifnotthis.mainLayerthen this.initLayer() end ifshowdataandthis.mainLayerthen this.updateWithShowData(showdata) end ifthis.mainLayerthen pushNewLayer(this.mainLayer) endendfunctionthis.close() Log.i("PokerShakePanelclose") ifthis.mainLayerthen popLayer(this.mainLayer) end this.closeCountdown() this.removeLayer()this:dispose()endfunctionthis.sendMsgToCtrl(msgtype,msgdata,msgflag) Log.i("PokerShakePanel.sendMsgToCtrlmsgtype=="..msgtype) PokerShakeCtrl.getMsgFromPanel(msgtype,msgdata,msgflag)endfunctionthis.getMsgFromCtrl(msgtype,msgdata,msgflag) ifmsgtype==5then--é???…???a??ˉè?“??oelse Log.i("PokerShakePanel.getMsgFromCtrlmsgtype=="..msgtype)endifmsgtype==1thenthis.initLayer()elseifmsgtype==2then ifthis.mainLayerthen Log.w("PokerShakePanelmainLayerisindontneedcreatenewlayer") return endthis.initLayer()this.show(msgdata)elseifmsgtype==3thenthis.updateWithShowData(msgdata)elseifmsgtype==4thenthis.close()elseifmsgtype==5then ifnotthis.mainLayerthen Log.w("PokerShakePanelmainLayerisnotready") return end ifthis.widgetTable.Label_shakethen localtimestr=os.date("!%H:%M:%S",msgdata.counttime) this.timetype=msgdata.timetype ifmsgdata.timetype==1then this.widgetTable.Label_shake:setText("è·??|????????o¢??…??‰è??è???‰?"..timestr) this.widgetTable.Label_shake:setPosition(CCPointMake(7,0)) this.widgetTable.Button_shake:setTouchEnabled(false) this.widgetTable.Button_shake:loadTextures(imagePath.."btn_kscj1.png","","") elseifmsgdata.timetype==2then this.widgetTable.Label_shake:setText("???????o¢??…??‰è???‰?????—?é—′??o"..timestr) this.widgetTable.Label_shake:setPosition(CCPointMake(7,-15)) this.widgetTable.Button_shake:loadTextures(imagePath.."btn_kscj.png","","") ifthis.panelType==2orthis.panelType==3then this.widgetTable.Button_shake:setTouchEnabled(false) else this.widgetTable.Button_shake:setTouchEnabled(true) end elseifmsgdata.timetype==3then this.widgetTable.Label_shake:setText("?′???¨?·2??“???") this.widgetTable.Label_shake:setPosition(CCPointMake(7,0)) this.widgetTable.Button_shake:setTouchEnabled(false) this.widgetTable.Button_shake:loadTextures(imagePath.."btn_kscj1.png","","") elseifmsgdata.timetype==5then this.widgetTable.Label_shake:setText("????????????è???¤????èˉ·é??èˉ?") this.widgetTable.Label_shake:setPosition(CCPointMake(7,0)) this.widgetTable.Button_shake:setTouchEnabled(false) this.widgetTable.Button_shake:loadTextures(imagePath.."btn_kscj1.png","","") else --todo end endelseifmsgtype==6then this.dataTable.giftlist=msgdata --this.shortGiftlistByLevel(this.dataTable.giftlist)elseifmsgtype==7then --??1??oè?·?¥–???é?¢ localshorttable=this.shortGiftlistByLevel(msgdata) PLTable.print(shorttable) this.getGiftPanelshow(shorttable)elseLog.w("PokerShakePanel.getMsgFromPanelmsgtypeisout")endend--é?“?…·??‰?…§?-‰?o§??’?o?functionthis.shortGiftlistByLevel(giftlist) Log.i("PokerShakePanelshortGiftlistByLevel") localshorttable={} shorttable.itemlist={} --??°????|?è¢? localdzTable={["30050015"]=1,["30050016"]=1,["30050017"]=1,["30050018"]=1,["30050019"]=1,["30050020"]=1} --????°‘?|?è¢? localnmTable={["30050013"]=1,["30050014"]=1} shorttable.isbig=0 ifgiftlistandtype(giftlist)=="table"then forkey,valueinpairs(this.dataTable.giftlist)do fork,vinpairs(giftlist)do ifdzTable[tostring(v.iItemCode)]==1then v.iItemCode="30050015" end ifnmTable[tostring(v.iItemCode)]==1then v.iItemCode="30050013" end --print(k,v.iItemCode,v.iItemCount,v.sItemName) iftostring(value.giftid)==tostring(v.iItemCode)andtonumber(value.num)==tonumber(v.iItemCount)then shorttable.itemlist[#shorttable.itemlist+1]=value ifvalue.share==1then shorttable.isbig=1 end if#shorttable.itemlist==#giftlistthen returnshorttable end else --todo end end end else Log.w("giftlistisnottable") end returnshorttableend--è?·?¥–è?°?????’?o?functionthis.shorthasCollectItems(itemslist) Log.i("PokerShakePanelshorthasCollectItems") localshorttable={} ifitemslistandtype(itemslist)=="table"then fork,vinpairs(itemslist)do --print(k,v.dtGetPackageTime,v.sPackageName,v.iPackageId) ifnotshorttable[v.dtGetPackageTime]then shorttable[v.dtGetPackageTime]=v.sPackageName else shorttable[v.dtGetPackageTime]=shorttable[v.dtGetPackageTime].."???"..v.sPackageName end --ifnotshorttable[#shorttable]then -- shorttable[#shorttable]={name=v.sPackageName,time=v.dtGetPackageTime} --else -- ifshorttable[#shorttable].time==v.dtGetPackageTimethen -- shorttable[#shorttable].name=shorttable[#shorttable].name.."???"..v.sPackageName -- else -- shorttable[#shorttable+1]={name=v.sPackageName,time=v.dtGetPackageTime} -- end --end --shorttable[v.dtGetPackageTime][#shorttable[v.dtGetPackageTime]+1]={name=v.sPackageName,packageid=v.iPackageId} end else Log.w("itemslistisnottable") returnfalse end returnshorttableend--?‘??¥–?o????functionthis.shakeshake() Log.i("PokerShakePanelshakeshake") this.setTipsButtonEnble(false) this.setShakePanel(2) counttime=0 this.shaketype=1 this.closeCountdown() this.shaketime=os.time() this.canupdate=false cdTimer=this:setInterval(1000,this.countdown) this.widgetTable.Label_time:setText(5-counttime)end--?·???
?o¢??…functionthis.hbShow() Log.i("PokerShakePanelhbShow") localImage_panel=ImageView:create() Image_panel:ignoreContentAdaptWithSize(false) Image_panel:setSize(CCSizeMake(this.widgetTable.Image_box:getSize().width,this.widgetTable.Image_box:getSize().height)) Image_panel:setPosition(CCPointMake(this.widgetTable.Image_box:getSize().width/2,this.widgetTable.Image_box:getSize().height/2)) this.widgetTable.Image_box:addChild(Image_panel) this.widgetTable.shakehbbg=Image_panel this.widgetTable.shakehbtable={} fori=1,12do localgiftImage=ImageView:create() giftImage:loadTexture(imagePath.."icon_hb.png") giftImage:setPosition(CCPointMake((i-1)%4*107-159,113-(math.floor((i-1)/4)*101))) this.widgetTable.Image_box:addChild(giftImage) this.widgetTable.shakehbtable[#this.widgetTable.shakehbtable+1]=giftImage endend--?‘??¥–??¨?”?functionthis.startShakeAction() Log.i("PokerShakePanelstartShakeAction") --?‘??????¨?”? fork,vinpairs(this.widgetTable.shakehbtable)do localshake=CCSequence:createWithTwoActions(CCRotateTo:create(0.2,-6),CCRotateTo:create(0.2,6)) localback=CCSequence:createWithTwoActions(CCRepeat:create(shake,22),CCRotateTo:create(0.1,0)) --localrepeatshake=CCRepeatForever:create(shake) v:runAction(back) end end--????-¢??¨?”?functionthis.stopShakeAction() Log.i("PokerShakePanelstopShakeAction") --?‘??????¨?”? fork,vinpairs(this.widgetTable.shakehbtable)do --v:stopAllActions() localturnback=CCRotateTo:create(0.2,0) v:runAction(turnback) v:stopAllActions() endend--?‘??¥–???é?¢????€?functionthis.setShakePanel(panelType) this.panelType=panelType --??‰é’?????¤o????€? ifpanelType==1then this.widgetTable.Button_shake:setTouchEnabled(true) this.widgetTable.Button_shake:setVisible(true) this.widgetTable.Image_ytime:setVisible(true) this.widgetTable.Image_box:setVisible(false) this.widgetTable.Image_cue1:setVisible(false) this.widgetTable.Image_cue2:setVisible(true) ifthis.timetype==1then this.widgetTable.Button_shake:setTouchEnabled(false) elseifthis.timetype==2then this.widgetTable.Button_shake:setTouchEnabled(true) elseifthis.timetype==3then this.widgetTable.Label_shake:setText("?′???¨?·2??“???") this.widgetTable.Label_shake:setPosition(CCPointMake(7,0)) this.widgetTable.Button_shake:setTouchEnabled(false) this.widgetTable.Button_shake:loadTextures(imagePath.."btn_kscj1.png","","") elseifthis.timetype==5then this.widgetTable.Label_shake:setText("????????????è???¤????èˉ·é??èˉ?") this.widgetTable.Label_shake:setPosition(CCPointMake(7,0)) this.widgetTable.Button_shake:setTouchEnabled(false) this.widgetTable.Button_shake:loadTextures(imagePath.."btn_kscj1.png","","") else --todo end --?-‰??…?‘???€?‘?????€? elseifpanelType==2then this.widgetTable.Button_shake:setTouchEnabled(false) this.widgetTable.Button_shake:setVisible(false) this.widgetTable.Image_ytime:setVisible(false) this.widgetTable.Image_box:setVisible(true) this.widgetTable.Image_cue1:setVisible(true) this.widgetTable.Image_cue2:setVisible(false) --?‘??¥–????€? elseifpanelType==3then this.widgetTable.Button_shake:setTouchEnabled(false) this.widgetTable.Button_shake:setVisible(false) this.widgetTable.Image_ytime:setVisible(true) this.widgetTable.Image_box:setVisible(true) this.widgetTable.Image_cue1:setVisible(true) this.widgetTable.Image_cue2:setVisible(false) else --todo endend--?…3é—-?€’è???—?functionthis.closeCountdown() this.canupdate=true ifcdTimerthencdTimer:dispose()endend--?€’è???—?functionthis.countdown()--print("PokerShakeCtrlcountdown")counttime=os.time()-this.shaketimeifcounttime<0orcounttime>14then Log.w("counttimeisout") this.closeCountdown() this.setShakePanel(1) this.setTipsButtonEnble(true) this.shaketype=1elseifcounttime==0then --todo elseifcounttime>=5andcounttime<13then ifthis.shaketype==1then this.setShakePanel(3) this.accelerate:startRock() this.widgetTable.Label_time1:setText(13-counttime) this.startShakeAction() this.shaketype=2 end elseifcounttime>=13then ifthis.shaketype==2then this.closeCountdown() this.accelerate:stopRock() --test --this.rocktable={0,9,10,11,25,26,40,41,42} --ifthis.rockcount>#this.rocktablethen -- this.rockcount=1 --else -- this.rockcount=this.rockcount+1 --end --this.accelerate.rock=this.rocktable[this.rockcount] ifthis.accelerate.rock>=1then this.accelerate.rock=this.accelerate.rock-1 end Log.i("?‘???¨?????°???"..tostring(this.accelerate.rock)) this.stopShakeAction() this.dataTable.shakenum=this.accelerate.rock this.sendMsgToCtrl(3,this.accelerate.rock) --test --localshorttable=this.shortGiftlistByLevel(json.decode(this.testgiftdata)) --PLTable.print(shorttable) --this.getGiftPanelshow(shorttable) --this.setShakePanel(1) this.setTipsButtonEnble(true) this.shaketype=1endendthis.widgetTable.Label_time:setText(5-counttime)localx=13-counttimeifx<0then x=0endthis.widgetTable.Label_time1:setText(x)end--?±?è”??o??o§é?¢?????‰é’?functionthis.setTipsButtonEnble(isEnabled) Log.i("PokerShakePanelsetTipsButtonEnble") this.widgetTable.Button_info:setTouchEnabled(isEnabled) this.widgetTable.Button_record:setTouchEnabled(isEnabled) this.widgetTable.Button_gift:setTouchEnabled(isEnabled) this.widgetTable.Button_close:setTouchEnabled(isEnabled)end--?′???¨è§????é?¢???functionPanelshow() Log.i("PokerShakePanelinfoPanelshow") ifthis.widgetTable.tipsTouchBgthen Log.w("PokerShakePaneltipsTouchBgisexist,pleasecloseoldtipsTouchBg") return end localmainWidget=GUIReader:shareReader():widgetFromJsonFile(jsonPath.."tipsbg.json") ifnotmainWidgetthen Log.e("PokerShakePanelReadtipsbgWidgetFromJsonFileFail") return end --é?2?-¢???é€?bg localwinSize=CCDirector:sharedDirector():getWinSize() this.widgetTable.tipsTouchBg=tolua.cast(UIHelper:seekWidgetByName(mainWidget,"ScrollViewbg"),"ScrollView") this.widgetTable.tipsTouchBg:setSize(winSize) this.widgetTable.tipsTouchBg:setPosition(CCPointMake(0,0)) this.widgetTable.tipsTouchBg:setAnchorPoint(CCPointMake(0,0)) this.widgetTable.tipsTouchBg:setTouchEnabled(true) this.widgetTable.tipsTouchBg:removeFromParent() this.widgetTable.mainWidget:addChild(this.widgetTable.tipsTouchBg) --this.widgetTable.tipsTouchBg=touchBg this.widgetTable.Image_infoPanel=ImageView:create() this.widgetTable.Image_infoPanel:loadTexture(imagePath.."bg_popup02.png") this.widgetTable.Image_infoPanel:setPosition(CCPointMake(winSize.width/2,winSize.height/2)) this.widgetTable.tipsTouchBg:addChild(this.widgetTable.Image_infoPanel) this.widgetTable.Button_infoPanelclose=Button:create() this.widgetTable.Button_infoPanelclose:loadTextures(imagePath.."btn_close.png","","") this.widgetTable.Button_infoPanelclose:setPosition(CCPointMake(315,197)) localfunctioninfoPanelclose_Clicked(sender,eventType) ifeventType==2then Log.d("infoPanelclose_Clicked") this.tipsPanelclose() endend ifthis.widgetTable.Button_infoPanelclosethen this.widgetTable.Button_infoPanelclose:addTouchEventListener(infoPanelclose_Clicked) end this.widgetTable.Image_infoPanel:addChild(this.widgetTable.Button_infoPanelclose) UITools.setGameFont(this.widgetTable.tipsTouchBg,"FZCuYuan-M03S","fzcyt.ttf")end--è?·?¥–è?°???é?¢???functionthis.recordPanelshow() Log.i("PokerShakePanelrecordPanelshow") ifthis.widgetTable.tipsTouchBgthen Log.w("PokerShakePaneltipsTouchBgisexist,pleasecloseoldtipsTouchBg") return end localmainWidget=GUIReader:shareReader():widgetFromJsonFile(jsonPath.."tipsbg.json") ifnotmainWidgetthen Log.e("PokerShakePanelReadtipsbgWidgetFromJsonFileFail") return end --é?2?-¢???é€?bg localwinSize=CCDirector:sharedDirector():getWinSize() this.widgetTable.tipsTouchBg=tolua.cast(UIHelper:seekWidgetByName(mainWidget,"ScrollViewbg"),"ScrollView") this.widgetTable.tipsTouchBg:setSize(winSize) this.widgetTable.tipsTouchBg:setPosition(CCPointMake(0,0)) this.widgetTable.tipsTouchBg:setAnchorPoint(CCPointMake(0,0)) this.widgetTable.tipsTouchBg:setTouchEnabled(true) this.widgetTable.tipsTouchBg:removeFromParent() this.widgetTable.mainWidget:addChild(this.widgetTable.tipsTouchBg) --this.widgetTable.tipsTouchBg=touchBg localImage_panel=ImageView:create() Image_panel:loadTexture(imagePath.."bg_popup01.png") Image_panel:setPosition(CCPointMake(winSize.width/2,winSize.height/2)) this.widgetTable.tipsTouchBg:addChild(Image_panel) localImage_title=ImageView:create() Image_title:loadTexture(imagePath.."txt_hjjl.png") Image_title:setPosition(CCPointMake(-5,125)) Image_panel:addChild(Image_title) localButton_panelclose=Button:create() Button_panelclose:loadTextures(imagePath.."btn_close.png","","") Button_panelclose:setPosition(CCPointMake(313,170)) localfunctioninfoPanelclose_Clicked(sender,eventType) ifeventType==2then Log.d("infoPanelclose_Clicked") this.tipsPanelclose() endend ifButton_panelclosethen Button_panelclose:addTouchEventListener(infoPanelclose_Clicked) end Image_panel:addChild(Button_panelclose) localtimeLabel=Label:create() timeLabel:setPosition(CCPointMake(-235,70)) timeLabel:setText("è?·?¥–?—?é—′") timeLabel:setFontSize(18) timeLabel:setColor(ccc3(240,212,128)) Image_panel:addChild(timeLabel) localgiftLabel=Label:create() giftLabel:setPosition(CCPointMake(-45,70)) giftLabel:setText("è?·?¥–?‰??“?") giftLabel:setFontSize(18) giftLabel:setColor(ccc3(240,212,128)) Image_panel:addChild(giftLabel) --?¤????è?·?¥–è?°??? localshorttable=this.shorthasCollectItems(this.dataTable.showData.ams_resp.hasCollectItems) --PLTable.print(shorttable) localgiftbg=ScrollView:create() giftbg:setSize(CCSizeMake(587,280)) giftbg:setClippingType(1) giftbg:setPosition(CCPointMake(-302,-238)) giftbg:setAnchorPoint(CCPointMake(0,0)) giftbg:setEnabled(true) giftbg:setTouchEnabled(true) giftbg:setBounceEnabled(false) Image_panel:addChild(giftbg) localscollHeight=280 localmathheight=0 localkey_table={} --??–??o?‰€??‰???é”? forkey,_inpairs(shorttable)do table.insert(key_table,key) end --?ˉ1?‰€??‰é”?è??è????’?o? table.sort(key_table) for_,keyinpairs(key_table)do --print(key,shorttable[key]) locallineImage=ImageView:create() lineImage:loadTexture(imagePath.."line.png") lineImage:setAnchorPoint(CCPointMake(0.5,0)) lineImage:setPosition(CCPointMake(293,mathheight+10)) giftbg:addChild(lineImage) localgiftLabel=Label:create() giftLabel:setFontSize(18) giftLabel:setColor(ccc3(255,227,200)) giftLabel:setAnchorPoint(CCPointMake(0,1)) giftLabel:ignoreContentAdaptWithSize(false) giftLabel:setText(shorttable[key]) print("giftLabel:getStringLength()",giftLabel:getStringLength()) localgiftLabelheight=math.ceil(giftLabel:getStringLength()/57)*25 giftLabel:setSize(CCSizeMake(350,giftLabelheight)) mathheight=mathheight+giftLabelheight+20 giftLabel:setPosition(CCPointMake(220,mathheight)) giftbg:addChild(giftLabel) localtimeLabel=Label:create() timeLabel:setFontSize(18) timeLabel:setColor(ccc3(255,227,200)) timeLabel:setAnchorPoint(CCPointMake(0,1)) timeLabel:ignoreContentAdaptWithSize(false) timeLabel:setText(key) print("timeLabel:getStringLength()",timeLabel:getStringLength()) localtimeLabelheight=math.ceil(timeLabel:getStringLength()/30)*25 timeLabel:setSize(CCSizeMake(180,giftLabelheight)) timeLabel:setPosition(CCPointMake(25,mathheight)) giftbg:addChild(timeLabel) end ifmathheight<scollHeightthen giftbg:setPosition(CCPointMake(-302,-238+scollHeight-mathheight)) end giftbg:setContentSize(CCSizeMake(587,mathheight)) giftbg:setInnerContainerSize(CCSizeMake(587,mathheight)) UITools.setGameFont(this.widgetTable.tipsTouchBg,"FZCuYuan-M03S","fzcyt.ttf")end--?…¨é?¨?¥–?±
é?¢???functionthis.giftPanelshow() Log.i("PokerShakePanelgiftPanelshow") ifthis.widgetTable.tipsTouchBgthen Log.w("PokerShakePaneltipsTouchBgisexist,pleasecloseoldtipsTouchBg") return end localmainWidget=GUIReader:shareReader():widgetFromJsonFile(jsonPath.."tipsbg.json") ifnotmainWidgetthen Log.e("PokerShakePanelReadtipsbgWidgetFromJsonFileFail") return end --é?2?-¢???é€?bg localwinSize=CCDirector:sharedDirector():getWinSize() this.widgetTable.tipsTouchBg=tolua.cast(UIHelper:seekWidgetByName(mainWidget,"ScrollViewbg"),"ScrollView") this.widgetTable.tipsTouchBg:setSize(winSize) this.widgetTable.tipsTouchBg:setPosition(CCPointMake(0,0)) this.widgetTable.tipsTouchBg:setAnchorPoint(CCPointMake(0,0)) this.widgetTable.tipsTouchBg:setTouchEnabled(true) this.widgetTable.tipsTouchBg:removeFromParent() this.widgetTable.mainWidget:addChild(this.widgetTable.tipsTouchBg) --this.widgetTable.tipsTouchBg=touchBg localImage_panel=ImageView:create() Image_panel:loadTexture(imagePath.."bg_popup01.png") Image_panel:setPosition(CCPointMake(winSize.width/2,winSize.height/2)) this.widgetTable.tipsTouchBg:addChild(Image_panel) localImage_title=ImageView:create() Image_title:loadTexture(imagePath.."txt_qbjc.png") Image_title:setPosition(CCPointMake(-5,125)) Image_panel:addChild(Image_title) localButton_panelclose=Button:create() Button_panelclose:loadTextures(imagePath.."btn_close.png","","") Button_panelclose:setPosition(CCPointMake(313,170)) localfunctioninfoPanelclose_Clicked(sender,eventType) ifeventType==2then Log.d("infoPanelclose_Clicked") this.tipsPanelclose() endend ifButton_panelclosethen Button_panelclose:addTouchEventListener(infoPanelclose_Clicked) end Image_panel:addChild(Button_panelclose) localgiftbg=ScrollView:create() giftbg:setSize(CCSizeMake(587,340)) giftbg:setClippingType(1) giftbg:setPosition(CCPointMake(-302,-238)) giftbg:setAnchorPoint(CCPointMake(0,0)) giftbg:setEnabled(true) giftbg:setTouchEnabled(true) giftbg:setBounceEnabled(false) Image_panel:addChild(giftbg) localscollHeight=340 localmathheight=math.ceil(#this.dataTable.giftlist/5)*110 ifmathheight>scollHeightthen scollHeight=mathheight end giftbg:setContentSize(CCSizeMake(587,scollHeight)) giftbg:setInnerContainerSize(CCSizeMake(587,scollHeight)) fori=1,#this.dataTable.giftlistdo localgiftImage=ImageView:create() giftImage:loadTexture(imagePath.."giftpic/"..this.dataTable.giftlist[i].pic..".png") giftImage:setPosition(CCPointMake((i-1)%5*110+73,scollHeight-(math.floor((i-1)/5)*110+55))) --giftImage:setPosition(CCPointMake(0,0)) giftbg:addChild(giftImage) end UITools.setGameFont(this.widgetTable.tipsTouchBg,"FZCuYuan-M03S","fzcyt.ttf")end--è?·?¥–é?¢???functionthis.getGiftPanelshow(shorttable) Log.i("PokerShakePanelgetGiftPanelshow") ifthis.widgetTable.tipsTouchBgthen Log.w("PokerShakePaneltipsTouchBgisexist,pleasecloseoldtipsTouchBg") return end localmainWidget=GUIReader:shareReader():widgetFromJsonFile(jsonPath.."tipsbg.json") ifnotmainWidgetthen Log.e("PokerShakePanelReadtipsbgWidgetFromJsonFileFail") return end --é?2?-¢???é€?bg localwinSize=CCDirector:sharedDirector():getWinSize() this.widgetTable.tipsTouchBg=tolua.cast(UIHelper:seekWidgetByName(mainWidget,"ScrollViewbg"),"ScrollView") this.widgetTable.tipsTouchBg:setSize(winSize) this.widgetTable.tipsTouchBg:setPosition(CCPointMake(0,0)) this.widgetTable.tipsTouchBg:setAnchorPoint(CCPointMake(0,0)) this.widgetTable.tipsTouchBg:setTouchEnabled(true) this.widgetTable.tipsTouchBg:removeFromParent() this.widgetTable.mainWidget:addChild(this.widgetTable.tipsTouchBg) --this.widgetTable.tipsTouchBg=touchBg localImage_panel=ImageView:create() Image_panel:loadTexture(imagePath.."bg_popup03.png") Image_panel:setPosition(CCPointMake(winSize.width/2,winSize.height/2)) this.widgetTable.tipsTouchBg:addChild(Image_panel) localButton_panelclose=Button:create() Button_panelclose:loadTextures(imagePath.."btn_close.png","","") Button_panelclose:setPosition(CCPointMake(323,179)) localfunctioninfoPanelclose_Clicked(sender,eventType) ifeventType==2then Log.d("infoPanelclose_Clicked") this.tipsPanelclose() endend ifButton_panelclosethen Button_panelclose:addTouchEventListener(infoPanelclose_Clicked) end Image_panel:addChild(Button_panelclose) localtopLabel=Label:create() topLabel:setPosition(CCPointMake(0,130)) topLabel:setText("??‰??3?????
??¨?§’??…?‘??o????") topLabel:setFontSize(24) topLabel:setColor(ccc3(255,247,196)) Image_panel:addChild(topLabel) localbottomLabel=Label:create() bottomLabel:setPosition(CCPointMake(0,80)) math.randomseed(tostring(os.time()):reverse():sub(1,7))--math.randomseed(this.dataTable.timestamp)localrandomx=math.random(1,2)localnameTable={{"é???—o??‘??¨??o","è??è′¢?¤§?¥?"},{"?‘?é’±?°?é??è??","Go???è???oo"},{"????‰??…¨è???—o","?‰?é€??—o?—o"},{"é???ˉ???–??‰??o","è′μ????oo"}} localnametext=nameTable[1][randomx] iftonumber(this.dataTable.shakenum)>55then nametext=nameTable[1][randomx] elseiftonumber(this.dataTable.shakenum)>35then nametext=nameTable[2][randomx] elseiftonumber(this.dataTable.shakenum)>10then nametext=nameTable[3][randomx] else nametext=nameTable[4][randomx] end bottomLabel:setText("è¢??°???o???"..nametext) bottomLabel:setFontSize(22) bottomLabel:setColor(ccc3(255,247,196)) Image_panel:addChild(bottomLabel) localtimeLabel=Label:create() timeLabel:setPosition(CCPointMake(-35,130)) timeLabel:setText("08") timeLabel:setFontSize(34) timeLabel:setColor(ccc3(253,255,99)) Image_panel:addChild(timeLabel) localcountLabel=Label:create() countLabel:setPosition(CCPointMake(122,130)) countLabel:setText(tostring(this.dataTable.shakenum)) countLabel:setFontSize(34) countLabel:setColor(ccc3(253,255,99)) Image_panel:addChild(countLabel) --é?“?…· localitemcount=#shorttable.itemlist fori=1,itemcountdo localgiftImage=ImageView:create() giftImage:loadTexture(imagePath.."giftpic/"..shorttable.itemlist[i].pic..".png") giftImage:setPosition(CCPointMake(600/(itemcount+1)*i-300,-15)) --giftImage:setPosition(CCPointMake(0,0)) Image_panel:addChild(giftImage) localitemLabel=Label:create() itemLabel:setPosition(CCPointMake(600/(itemcount+1)*i-300,-95)) itemLabel:setText(shorttable.itemlist[i].name) itemLabel:setFontSize(16) itemLabel:setColor(ccc3(240,212,128)) Image_panel:addChild(itemLabel) end --??????????o?????‰? localbgRT=CCRenderTexture:create(834,500) ifshorttable.isbig==1then localshareSprite=CCSprite:create(imagePath.."bg_01.png") shareSprite:setPosition(ccp(417,250)) localshareSpritegift=CCSprite:create(imagePath.."giftpic/"..shorttable.itemlist[1].pic..".png") shareSpritegift:setPosition(ccp(417,250-15)) shareSpritegift:setScaleX(1.3) shareSpritegif
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025-2030全球商店可視化工具行業(yè)調(diào)研及趨勢分析報(bào)告
- 2025年全球及中國單立柱托盤堆垛機(jī)行業(yè)頭部企業(yè)市場占有率及排名調(diào)研報(bào)告
- 嚴(yán)守黨的生活紀(jì)律維護(hù)黨員良好形象黨員教育培訓(xùn)課件
- 作用方法局麻作用吸收作用表面麻醉浸潤麻醉麻醉蛛網(wǎng)膜下腔麻醉硬膜外麻醉講解
- 醫(yī)學(xué)儀器外貿(mào)購銷合同范本年
- 土地房屋轉(zhuǎn)讓簡單合同范本
- 服裝設(shè)計(jì)與生產(chǎn)加工合同
- 項(xiàng)目承包服務(wù)合同范本
- 財(cái)務(wù)管理系統(tǒng)開發(fā)合作合同
- 店面房出租經(jīng)營合同書
- 心力衰竭業(yè)務(wù)學(xué)習(xí)護(hù)理課件
- 《項(xiàng)脊軒志》公開課課件【一等獎(jiǎng)】
- 美發(fā)學(xué)徒助理職業(yè)規(guī)劃書
- 法醫(yī)病理學(xué)課件
- 職代會(huì)提案征集表
- 介紹uppc技術(shù)特點(diǎn)
- 《諫逐客書》理解性默寫(帶答案)最詳細(xì)
- 《黑駿馬》讀書筆記思維導(dǎo)圖
- 2023年物理會(huì)考真題貴州省普通高中學(xué)業(yè)水平考試試卷
- 盤扣式懸挑腳手架專項(xiàng)施工方案
- 高中教師業(yè)務(wù)知識(shí)考試 數(shù)學(xué)試題及答案
評論
0/150
提交評論