源战役客户端
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

24 řádky
660 B

před 1 měsícem
  1. InstructionSmallItem = InstructionSmallItem or BaseClass(BaseItem)
  2. function InstructionSmallItem:__init()
  3. self.base_file = "common"
  4. self.layout_file = "InstructionSmallItem"
  5. self.height = 0
  6. self:Load()
  7. end
  8. function InstructionSmallItem:Load_callback()
  9. self.contentText = self:GetChild("contentText")
  10. self.contentText_t = self:GetChild("contentText"):GetComponent("Text")
  11. end
  12. function InstructionSmallItem:SetData(vo)
  13. if vo then
  14. self.contentText_t.text = vo.content
  15. self.height = self.contentText_t.preferredHeight
  16. self.contentText.sizeDelta = Vector2(400, self.height)
  17. end
  18. end
  19. function InstructionSmallItem:GetHeight()
  20. return self.height
  21. end