InstructionSmallItem = InstructionSmallItem or BaseClass(BaseItem)
|
|
function InstructionSmallItem:__init()
|
|
self.base_file = "common"
|
|
self.layout_file = "InstructionSmallItem"
|
|
self.height = 0
|
|
self:Load()
|
|
end
|
|
|
|
function InstructionSmallItem:Load_callback()
|
|
self.contentText = self:GetChild("contentText")
|
|
self.contentText_t = self:GetChild("contentText"):GetComponent("Text")
|
|
end
|
|
|
|
function InstructionSmallItem:SetData(vo)
|
|
if vo then
|
|
self.contentText_t.text = vo.content
|
|
self.height = self.contentText_t.preferredHeight
|
|
self.contentText.sizeDelta = Vector2(400, self.height)
|
|
end
|
|
end
|
|
|
|
function InstructionSmallItem:GetHeight()
|
|
return self.height
|
|
end
|