mm
This commit is contained in:
@@ -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上的事件,例如点击等
|
||||
|
||||
Reference in New Issue
Block a user