35 lines
917 B
Lua
35 lines
917 B
Lua
require("public.class")
|
||
---@class TRBasePanel:ClassBase
|
||
local TRBasePanel = class("TRBasePanel")
|
||
|
||
-- 初始化,只会调用一次
|
||
---@param csObj Coolape.CLPanelLua
|
||
function TRBasePanel:init(csObj)
|
||
self.uiobjs = {}
|
||
---@type Coolape.CLPanelLua
|
||
self.csSelf = csObj
|
||
---@type UnityEngine.Transform
|
||
self.transform = csObj.transform
|
||
end
|
||
|
||
---public 当有通用背板显示时的回调
|
||
---@param cs Coolape.CLPanelLua
|
||
function TRBasePanel:onShowFrame(cs)
|
||
if cs.frameObj then
|
||
---@type _BGFrame1Param
|
||
local d = {}
|
||
-- d.title = LGet(cs.titleKeyName)
|
||
d.title = cs.titleKeyName
|
||
d.panel = cs
|
||
cs.frameObj:init(d)
|
||
end
|
||
end
|
||
|
||
-- 当按了返回键时,关闭自己(返值为true时关闭)
|
||
function TRBasePanel:hideSelfOnKeyBack()
|
||
return true
|
||
end
|
||
|
||
--------------------------------------------
|
||
return TRBasePanel
|