You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
3.3 KiB

  1. local BaseLayer = require("luaScript.ModuleEapSdk.BaseLayers.BaseLayer")
  2. local LayerTeamEnd = class("LayerTeamEnd", BaseLayer)
  3. function LayerTeamEnd.createWithData(__node, __zorder)
  4. local layer = LayerTeamEnd.new()
  5. layer.m_parent = __node
  6. __node:addChild(layer, __zorder)
  7. return layer
  8. end
  9. function LayerTeamEnd:myShow()
  10. -- self:addListener(true)
  11. self:initUI()
  12. end
  13. function LayerTeamEnd:myClose()
  14. end
  15. function LayerTeamEnd:initUI()
  16. self.imgPath = {
  17. "res/ModuleEapSdk/eapsdk_public_back_bg1.png",
  18. "res/ModuleEapSdk/eapsdk_public_back_bg2.png",
  19. "res/ModuleEapSdk/eapsdk_public_back_bg3.png",
  20. "res/ModuleEapSdk/eapsdk_bt_xb_sp.png",
  21. "res/ModuleEapSdk/eapsdk_wj_icon_decor.png",
  22. "res/ModuleEapSdk/eapsdk_wj_icon_question.png",
  23. "res/ModuleEapSdk/eapsdk_wj_btn_lingjiang.png",
  24. "res/ModuleEapSdk/eapsdk_wj_btn_rank.png",
  25. "res/ModuleEapSdk/eapsdk_btn_teamDetail.png",
  26. }
  27. local fix_x = display.width
  28. local fix_y = display.cy
  29. local imgBack2 = G_EapAbbreviation.createImageView(self.imgPath[2], self, cc.p(fix_x-10, fix_y-106), true, 2, 2101, cc.p(1, 0.5))
  30. imgBack2:setSize(cc.size(530, 204))
  31. local imgArrow1 = G_EapAbbreviation.createImageView(self.imgPath[5], imgBack2, cc.p(125, 170), false)
  32. local imgArrow2 = G_EapAbbreviation.createImageView(self.imgPath[4], imgBack2, cc.p(405, 170), false)
  33. imgArrow1:setScale(0.585)
  34. imgArrow2:setScale(0.585)
  35. local title = "赛事结束"
  36. G_EapAbbreviation.createSystemLabel(imgBack2, cc.p(265, 170), title, 32, cc.c3b(0xc8, 0xa8, 0x88), true)
  37. local resultStr = "玩家赛事结果描述"
  38. self.lblResult = G_EapAbbreviation.createSystemLabel(imgBack2, cc.p(265, 130), title, 25, cc.c3b(0xc8, 0xa8, 0x88), true)
  39. --赛事规则
  40. self.btnDes = ccui.Button:create(self.imgPath[6])
  41. self.btnDes:setPosition(cc.p(475, 185))
  42. self.btnDes:setScale(0.585)
  43. imgBack2:addChild(self.btnDes)
  44. addButtonListener(self.btnDes, function()
  45. print("LayerTeam btnDes clicked === ")
  46. local coreId = G_EapSdkMgr.m_matchInfos[1] and G_EapSdkMgr.m_matchInfos[1].coreId
  47. if not G_EapSdkMgr.m_rulesDes and coreId then
  48. G_EapSocketLogin.request_core_info(coreId)
  49. end
  50. self.m_parent.m_parent:showLayer(LAYER_ENUM.LAYER_TEAM_RULE)
  51. end)
  52. -- --排行榜
  53. -- self.btnRank = ccui.Button:create(self.imgPath[8])
  54. -- self.btnRank:setPosition(cc.p(70, 175))
  55. -- self.btnRank:setScale(0.585)
  56. -- imgBack2:addChild(self.btnRank)
  57. -- addButtonListener(self.btnRank, function()
  58. -- print("LayerTeam btnRank clicked === ")
  59. -- self.m_parent.m_parent:showLayer(LAYER_ENUM.LAYER_TEAM_RANK)
  60. -- end)
  61. --战队详情
  62. self.btnTeamDetail = ccui.Button:create(self.imgPath[9])
  63. self.btnTeamDetail:setPosition(cc.p(455, 100))
  64. -- self.btnTeamDetail:setScale(0.585)
  65. imgBack2:addChild(self.btnTeamDetail)
  66. addButtonListener(self.btnTeamDetail, function()
  67. self.m_parent.m_parent:showLayer(LAYER_ENUM.LAYER_TEAM_DETAIL)
  68. end)
  69. self.btnGo = ccui.Button:create(self.imgPath[7])
  70. self.btnGo:setPosition(cc.p(265, 45))
  71. self.btnGo:setScale(0.585)
  72. imgBack2:addChild(self.btnGo)
  73. addButtonListener(self.btnGo, function()
  74. F_EapOpenUrl(G_EapSdkMgr.m_awardUrl)
  75. end)
  76. end
  77. return LayerTeamEnd