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

21 lines
630 B
Lua

local BossStrategyCell = class("BossStrategyCell", BaseCell)
function BossStrategyCell:init()
local uiMap = self:getUIMap()
self.line = uiMap['cell.line']
self.tx = uiMap['cell.difficulty_tx']
end
function BossStrategyCell:refresh(params)
self.line:setVisible(params.idx ~= 1)
local str = ""
if params.idx == params.curIdx then
str = "<color=#90c8df>" .. I18N:getGlobalText(I18N.GlobalConst.ADVENTURE_STRATEGY_DESC, params.idx) .. "</color>"
else
str = "<color=#ffffff>" .. I18N:getGlobalText(I18N.GlobalConst.ADVENTURE_STRATEGY_DESC, params.idx) .. "</color>"
end
self.tx:setText(str)
end
return BossStrategyCell