KLAttPointSuitChoicePanel.lua 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. ---@class KLAttPointSuitChoicePanel:UIKmlLuaPanelBase
  2. ---@field view KLAttPointSuitChoicePanelView
  3. local KLAttPointSuitChoicePanel = class(UIKmlLuaPanelBase)
  4. local this =KLAttPointSuitChoicePanel
  5. ---创建时调用一次
  6. function this:Init()
  7. end
  8. ---创建或者刷新界面数据时调用
  9. function this:Refresh()
  10. local curCareer = self.args.curCareer
  11. ---@type cfg_career_column
  12. local careerConfig = SL:GetConfig("cfg_career",curCareer)
  13. local pics = string.split(careerConfig.recPicture,"|")
  14. local texts = string.split(careerConfig.recText,"|")
  15. for i = 1, #pics do
  16. GUI:UIPanel_Open("dev/outui/Role/Item/KLAttPointSuit/KLAttPointSuitItem",self.view.AttPointSuit,self,{pic=pics[i],text=texts[i],index=i-1},true)
  17. end
  18. end
  19. ---注册UI事件和服务器消息
  20. function this:RegistEvents()
  21. GUI:AddOnClickEvent(self.view.BgClick,self,self.BgClick)
  22. end
  23. function this:BgClick()
  24. GUI:UIPanel_Close("dev/outui/Role/Panel/KLAttPointSuitChoice/KLAttPointSuitChoicePanel")
  25. end
  26. function this:Close()
  27. end
  28. return this