源战役客户端
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 

24 行
660 B

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