52 lines
1.2 KiB
Lua
52 lines
1.2 KiB
Lua
|
|
local uiCtrl = require_ex('UI/Panels/Base/UICtrl')
|
|
local PANEL_ID = PanelId.BattlePassSeasonDisplay
|
|
|
|
|
|
|
|
|
|
BattlePassSeasonDisplayCtrl = HL.Class('BattlePassSeasonDisplayCtrl', uiCtrl.UICtrl)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BattlePassSeasonDisplayCtrl.s_messages = HL.StaticField(HL.Table) << {
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BattlePassSeasonDisplayCtrl.OnCreate = HL.Override(HL.Any) << function(self, arg)
|
|
self.view.controllerHintPlaceholder:InitControllerHintPlaceholder({ self.view.inputGroup.groupId })
|
|
local curServerTime = DateTimeUtils.GetCurrentTimestampBySeconds()
|
|
local leftSec = GameInstance.player.battlePassSystem.seasonData.closeTime - curServerTime
|
|
leftSec = math.max(leftSec, 0)
|
|
self.view.seasonEndReminderText.text = string.format(Language.LUA_BATTLEPASS_NEW_SEASON_PANEL_SEASON_END_TIME, UIUtils.getShortLeftTime(leftSec))
|
|
self.view.maskBtn.onClick:AddListener(function()
|
|
self:PlayAnimationOutWithCallback(function()
|
|
self:Close()
|
|
if arg ~= nil and arg.onClose ~= nil then
|
|
arg.onClose()
|
|
end
|
|
end)
|
|
end)
|
|
self.view.agreementTxt.text = BattlePassUtils.GetSeasonData().name
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HL.Commit(BattlePassSeasonDisplayCtrl)
|