pregame/accountlogin/gamepad/pregameinitialscreen_gamepad.lua:38 -- PREGAME_INITIAL_SCREEN_GAMEPAD_SCENE:RegisterCallback("StateChange", function(oldState, newState)
if newState == SCENE_SHOWING then
ZO_ControllerDisconnect_DismissPopup()
self:PerformDeferredInitialization()
-- Reset fade in animations
self.fadeMode = nil
self.esoAnimatedBackgroundAnimation:PlayInstantlyToStart()
self.pressTextAnimation:PlayInstantlyToStart()
self.pressAnyPromptFadingIn = false
KEYBIND_STRIP:RemoveDefaultExit()
self.currentKeybindStripDescriptor = self.pressAnyKeybindsDescriptor
if self:IsShowingVerificationError() then
self.currentKeybindStripDescriptor = self.verifyEmailKeybindsDescriptor
end
KEYBIND_STRIP:AddKeybindButtonGroup(self.currentKeybindStripDescriptor)
elseif newState == SCENE_SHOWN then
self.fadeMode = LOGO_FADE_IN
self.esoAnimatedBackgroundAnimation:PlayFromStart()
if IsErrorQueuedFromIngame() then
ZO_Pregame_DisplayServerDisconnectedError()
end
elseif newState == SCENE_HIDDEN then
self:ClearError()
PregameStateManager_ClearError()
KEYBIND_STRIP:RemoveKeybindButtonGroup(self.currentKeybindStripDescriptor)
KEYBIND_STRIP:RestoreDefaultExit()
self.continueDesired = false
self.continueAllowed = false
-- It's possible to switch from the gamepad UI to the keyboard UI while esoAnimatedBackgroundAnimation
-- is still playing. The OnStop handler of the animation may then attempt to advance the state, which
-- will fail when we are in the keyboard UI. To prevent the OnStop handler from doing anything, we
-- clear fadeMode.
self.fadeMode = nil
self.esoAnimatedBackgroundAnimation:Stop()
-- Similar to esoAnimatedBackgroundAnimation, we'll stop this animation if it's playing and prevent
-- it from carrying out any unwanted actions.
self.pressAnyPromptFadingIn = false
self.pressTextAnimation:Stop()
end
end)