源战役客户端
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

24 linhas
660 B

  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