This commit is contained in:
2020-08-06 22:56:33 +08:00
parent d8127ddae2
commit 113faa50ce
50 changed files with 1480 additions and 855 deletions

View File

@@ -48,6 +48,10 @@ function CSPMain.setBottomBtns()
CLUIUtl.resetList4Lua(objs.bottomGrid, objs.bottomCellPrefab, bottomBtns, CSPMain.initBottomBtn)
end
function CSPMain.refreshBtns()
CLUIUtl.resetList4Lua(objs.bottomGrid, objs.bottomCellPrefab, bottomBtns, CSPMain.initBottomBtn2)
end
function CSPMain.initBottomBtn(cell, data)
data.width = objs.bottomGrid.cellWidth
cell:init(data, CSPMain.onClickBottonBtn)
@@ -56,6 +60,10 @@ function CSPMain.initBottomBtn(cell, data)
end
end
function CSPMain.initBottomBtn2(cell, data)
cell:init(data, CSPMain.onClickBottonBtn)
end
function CSPMain.onClickBottonBtn(cell, data)
cell.luaTable.setSelected(true)
objs.LabelTitle.text = data.name
@@ -77,13 +85,11 @@ end
-- 网络请求的回调cmd指命succ成功失败msg消息paras服务器下行数据
function CSPMain.procNetwork(cmd, succ, msg, paras)
--[[
if(succ == 1) then
if(cmd == "xxx") then
-- TODO:
end
if (succ == NetSuccess) then
if cmd == NetProto.cmds.readNotice then
CSPMain.refreshBtns()
end
--]]
end
end
-- 处理ui上的事件例如点击等