KLMapNameTipPanel.lua 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ---@class KLMapNameTipPanel:UIKmlLuaPanelBase
  2. ---@field view KLMapNameTipPanelView
  3. local KLMapNameTipPanel = class(UIKmlLuaPanelBase)
  4. local this =KLMapNameTipPanel
  5. ---创建时调用一次
  6. function this:Init()
  7. end
  8. ---创建或者刷新界面数据时调用
  9. function this:Refresh()
  10. end
  11. function this:RefreshData(mapName)
  12. GUI:Image_loadTexture(self.view.ImgMapName,mapName,"Atlas/UIMapPanel.spriteatlas")
  13. if self.fadeAnim then
  14. --self.fadeAnim:Kill()
  15. GUI:Image_StopColorFadeInKeepOut(self.fadeAnim)
  16. self.fadeAnim = nil
  17. end
  18. --[[---@type KingML.KmlImage
  19. local imageControl = self.view.ImgMapName.kmlControl
  20. self.fadeAnim = imageControl.image:DoColorFadeInKeepOut(1,10,1)]]
  21. self.fadeAnim = GUI:Image_DoColorFadeInKeepOut(self.view.ImgMapName,1,10,1,function()
  22. self.fadeAnim = nil
  23. end)
  24. end
  25. ---注册UI事件和服务器消息
  26. function this:RegistEvents()
  27. end
  28. function this:Close()
  29. if self.fadeAnim then
  30. --self.fadeAnim:Kill()
  31. GUI:Image_StopColorFadeInKeepOut(self.fadeAnim)
  32. self.fadeAnim = nil
  33. end
  34. end
  35. return this