25 lines
562 B
Lua
25 lines
562 B
Lua
|
|
RuleView = {}
|
|
|
|
local M = RuleView
|
|
|
|
function RuleView.new(blur_view ,text)
|
|
setmetatable(M, {__index = BaseWindow})
|
|
local self = setmetatable({}, {__index = M})
|
|
self.class = "RuleView"
|
|
self._blur_view = blur_view
|
|
self:init("ui://Common/GameRule", text)
|
|
return self
|
|
end
|
|
function M:init(url, text)
|
|
BaseWindow.init(self, url)
|
|
local _mainView = self._view
|
|
local list = self._view:GetChild("list_rule")
|
|
list:RemoveChildrenToPool()
|
|
local item = list:AddItemFromPool()
|
|
item:GetChild("tex_rule").text = text
|
|
end
|
|
|
|
|
|
return M
|