|
- local BaseLayer = require("luaScript.ModuleEapSdk.BaseLayers.BaseLayer")
- local LayerCreateTeam = class("LayerCreateTeam", BaseLayer)
-
- function LayerCreateTeam.createWithData(__node, __zorder)
- local layer = LayerCreateTeam.new()
- layer.m_parent = __node
- __node:addChild(layer, __zorder)
- return layer
- end
-
- function LayerCreateTeam:myShow()
- -- self:addListener(true)
- self:initUI()
- end
-
- function LayerCreateTeam:myClose()
-
- end
-
- function LayerCreateTeam:initUI()
- self.imgPath = {
- "res/ModuleEapSdk/eapsdk_public_back_bg1.png",
- "res/ModuleEapSdk/eapsdk_public_back_bg2.png",
- "res/ModuleEapSdk/eapsdk_public_back_bg3.png",
- "res/ModuleEapSdk/eapsdk_wj_icon_question.png",
- "res/ModuleEapSdk/eapsdk_wj_btn_lingjiang.png",
- }
-
- local fix_x = display.width
- local fix_y = display.cy
- 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))
- imgBack2:setSize(cc.size(530, 204))
-
- local title = "创建战队后即可加入赛事"
- G_EapAbbreviation.createSystemLabel(imgBack2, cc.p(265, 170), title, 25, cc.c3b(0xc8, 0xa8, 0x88), true)
-
- --赛事规则
- self.btnDes = ccui.Button:create(self.imgPath[4])
- self.btnDes:setPosition(cc.p(475, 185))
- self.btnDes:setScale(0.585)
- imgBack2:addChild(self.btnDes)
- addButtonListener(self.btnDes, function()
- print("LayerCreateTeam btnDes clicked === ")
- local coreId = G_EapSdkMgr.m_matchInfos[1] and G_EapSdkMgr.m_matchInfos[1].coreId
- if not G_EapSdkMgr.m_rulesDes and coreId then
- G_EapSocketLogin.request_core_info(coreId)
- end
- self.m_parent.m_parent:showLayer(LAYER_ENUM.LAYER_TEAM_RULE)
- end)
-
- --创建战队
- self.btnGo = ccui.Button:create(self.imgPath[5])
- self.btnGo:setPosition(cc.p(265, 45))
- self.btnGo:setScale(0.585)
- imgBack2:addChild(self.btnGo)
-
- addButtonListener(self.btnGo, function()
- F_EapOpenUrl(G_EapSdkMgr.m_awardUrl)
- end)
- end
-
- return LayerCreateTeam
|