internalingame/tribute/gamepad/tributepatronselection_gamepad.lua:138 -- TRIBUTE_PATRON_SELECTION_GAMEPAD_FRAGMENT:RegisterCallback("StateChange", function(oldState, newState)
if newState == SCENE_FRAGMENT_SHOWN then
CALLBACK_MANAGER:RegisterCallback("AllDialogsHidden", self.OnGamepadDialogHidden)
CALLBACK_MANAGER:RegisterCallback("OnGamepadDialogShowing", self.OnGamepadDialogShowing)
--TODO Tribute: Switch this to neutral once neutral patrons become a thing
local DONT_HIGHLIGHT = false
self.draftArea:SetDraftId(TRIBUTE_PATRON_DRAFT_ID_FIRST_PLAYER_FIRST_PICK, DONT_HIGHLIGHT)
--Always start off with the grid focused
self:SelectFocusArea(self.gridArea)
--If there is a dialog showing, don't activate the focus yet
if not ZO_Dialogs_IsShowingDialog() then
self:ActivateCurrentFocus()
end
DIRECTIONAL_INPUT:Activate(self, self.control)
KEYBIND_STRIP:AddKeybindButtonGroup(self.keybindStripDescriptor)
elseif newState == SCENE_FRAGMENT_HIDING then
CALLBACK_MANAGER:UnregisterCallback("AllDialogsHidden", self.OnGamepadDialogHidden)
CALLBACK_MANAGER:UnregisterCallback("OnGamepadDialogShowing", self.OnGamepadDialogShowing)
self:DeactivateCurrentFocus()
DIRECTIONAL_INPUT:Deactivate(self)
KEYBIND_STRIP:RemoveKeybindButtonGroup(self.keybindStripDescriptor)
end
end)