KLBossHpItem.lua 655 B

123456789101112131415161718192021222324252627282930313233
  1. ---@class KLBossHpItem:UIKmlLuaPanelBase
  2. ---@field view KLBossHpItemView
  3. local KLBossHpItem = class(UIKmlLuaPanelBase)
  4. local this = KLBossHpItem
  5. ---创建时调用一次
  6. function this:Init()
  7. end
  8. ---创建或者刷新界面数据时调用
  9. function this:RefreshItem(args)
  10. self.args = args
  11. GUI:Item_setItemId(self.view.equip_item,self.args.cfgId)
  12. --GUI:Item_setItemId(self.view.equip_item,20900002)
  13. end
  14. ---注册UI事件和服务器消息
  15. function this:RegistEvents()
  16. GUI:AddOnClickEvent(self.view.btn,self,self.BtnClick)
  17. end
  18. function this:BtnClick()
  19. SL:OpenTips("", self.args.cfgId)
  20. end
  21. function this:Close()
  22. end
  23. return this