Files
tianrunCRM/Assets/CoolapeFrame/Templates/Lua/NewLuaPanel.lua
2020-07-04 14:41:25 +08:00

74 lines
1.7 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- xx界面
do
local #SCRIPTNAME# = {}
---@type Coolape.CLPanelLua
local csSelf = nil
---@type UnityEngine.Transform
local transform = nil
local uiobjs = {}
-- 初始化,只会调用一次
function #SCRIPTNAME#.init(csObj)
csSelf = csObj;
transform = csObj.transform;
--[[
上的组件getChild(transform, "offset", "Progress BarHong"):GetComponent("UISlider");
--]]
end
-- 设置数据
function #SCRIPTNAME#.setData(paras)
end
--当有通用背板显示时的回调
function #SCRIPTNAME#.onShowFrame( )
end
-- 显示在c#中。show为调用refreshshow和refresh的区别在于当页面已经显示了的情况当页面再次出现在最上层时只会调用refresh
function #SCRIPTNAME#.show()
end
-- 刷新
function #SCRIPTNAME#.refresh()
end
-- 关闭页面
function #SCRIPTNAME#.hide()
end
-- 网络请求的回调cmd指命succ成功失败msg消息paras服务器下行数据
function #SCRIPTNAME#.procNetwork (cmd, succ, msg, paras)
--[[
if(succ == NetSuccess) then
if(cmd == "xxx") then
-- TODO:
end
end
--]]
end
-- 处理ui上的事件例如点击等
function #SCRIPTNAME#.uiEventDelegate( go )
local goName = go.name;
--[[
if(goName == "xxx") then
--TODO:
end
--]]
end
-- 当顶层页面发生变化时回调
function #SCRIPTNAME#.onTopPanelChange( topPanel )
end
-- 当按了返回键时关闭自己返值为true时关闭
function #SCRIPTNAME#.hideSelfOnKeyBack( )
return true;
end
--------------------------------------------
return #SCRIPTNAME#;
end