pregame/console/gamestartup/gamestartup_gamepad.lua:22 -- GAME_STARTUP_MAIN_GAMEPAD_SCENE:RegisterCallback("StateChange", function(oldState, newState)
if newState == SCENE_SHOWING then
if not self.serverSelection then
self.serverSelection = tonumber(GetCVar("SelectedServer"))
end
self:PerformDeferredInitialize()
self:PopulateMainList()
self:SetCurrentList(self.mainList)
if self.mustPurchaseGame then
KEYBIND_STRIP:AddKeybindButtonGroup(self.freeTrialEndKeybindDescriptor)
--[[ The player needs to purchase the game, no need to wait on RequestAnnouncements to get something that we're going to overwrite anyway ]]--
local platformStore = ""
if GetUIPlatform() == UI_PLATFORM_PS4 then
platformStore = GetString(SI_FREE_TRIAL_PLATFORM_STORE_PS4)
end
self.announcement:SetText(zo_strformat(SI_FREE_TRIAL_EXPIRED_ANNOUNCEMENT, platformStore))
self.gotMOTD = false
else
KEYBIND_STRIP:AddKeybindButtonGroup(self.mainKeybindStripDescriptor)
--[[ if we don't have an MOTD, kick off RequestAnnouncements and show a loading animation. The loading animation is dismissed in OnAnnouncementsResult() below ]]--
if not self.gotMOTD then
CREATE_LINK_LOADING_SCREEN_GAMEPAD:Show("AccountLogin", RequestAnnouncements, GetString(SI_CONSOLE_PREGAME_LOADING))
else
self.gotMOTD = false
self.canCancelOrLoadPlatforms = true
end
end
elseif newState == SCENE_HIDDEN then
self:Deactivate()
KEYBIND_STRIP:RemoveKeybindButtonGroup(self.mustPurchaseGame and self.freeTrialEndKeybindDescriptor or self.mainKeybindStripDescriptor)
end
end)