KLUICommonStrTipsPanel.lua 834 B

12345678910111213141516171819202122232425262728293031
  1. ---@class KLUICommonStrTipsPanel:UIKmlLuaPanelBase
  2. ---@field view KLUICommonTipsPanelView
  3. local KLUICommonStrTipsPanel = class(UIKmlLuaPanelBase)
  4. local this =KLUICommonStrTipsPanel
  5. ---创建时调用一次
  6. function this:Init()
  7. end
  8. ---创建或者刷新界面数据时调用
  9. function this:Refresh()
  10. GUI:Text_setString(self.view.tipContent,(self.args and self.args.str) or "")
  11. GUI:Text_setString(self.view.txt_title,(self.args and self.args.title) or "")
  12. end
  13. ---注册UI事件和服务器消息
  14. function this:RegistEvents()
  15. GUI:AddOnClickEvent(self.view.closeBtn,self,self.CloseSelf)
  16. GUI:AddOnClickEvent(self.view.MaskCloseButton,self,self.CloseSelf)
  17. end
  18. function this:CloseSelf()
  19. GUI:UIPanel_Close('dev/ui/Common/Panel/KLUICommonStrTips/KLUICommonStrTipsPanel')
  20. end
  21. function this:Close()
  22. end
  23. return this