源战役客户端
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

24 wiersze
660 B

1 miesiąc temu
  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