c1_lua/lua/app/ui/tips/get_rune_tips.lua
2023-04-03 10:59:13 +08:00

27 lines
752 B
Lua

local BaseTips = require "app/ui/tips/base_tips"
local GetRuneTips = class("GetRuneTips", BaseTips)
function GetRuneTips:ctor(params)
self.params = params
end
function GetRuneTips:getPrefabPath()
return "assets/prefabs/ui/tips/get_rune_tips.prefab"
end
function GetRuneTips:onLoadRootComplete()
local uiMap = self.root:genAllChildren()
self.runeIcon = uiMap["get_rune_tips.rune_icon"]
uiMap["get_rune_tips.title_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.CONGRATULATE_GET_DESC))
end
function GetRuneTips:onRefresh()
self.root:addClickListener(function ()
self:closeUI()
end)
local runeEntity = DataManager.BagData.RuneData:getRuneByCfgId(self.params.runeId)
self.runeIcon:setSprite(runeEntity:getIconRes())
end
return GetRuneTips