ingame/zo_quest/gamepad/questjournal_gamepad.lua:307 -- GAMEPAD_QUEST_JOURNAL_OPTIONS_SCENE:RegisterCallback("StateChange", function(oldState, newState)
if newState == SCENE_SHOWING then
self:RefreshOptionsList()
if not self.optionsList:IsEmpty() then
-- Select the first enabled option (or the first item, if none are enabled)
local selectedIndex = 1
for i, option in ipairs(self.options) do
if option.enabled() then
selectedIndex = i
break
end
end
self.optionsList:SetSelectedIndex(selectedIndex)
end
self:SetCurrentList(self.optionsList)
self:SetKeybindButtonGroup(self.optionsKeybindStripDescriptor)
elseif newState == SCENE_HIDDEN then
if SCENE_MANAGER:IsShowingNext(self.sceneName) then
returningFromOptions = true
end
self.optionsList:Deactivate()
self:SetKeybindButtonGroup(nil)
end
end)