ESO Lua File v100011

ingame/zo_quest/gamepad/questjournal_gamepad.lua

[◄ back to folders ]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
local QUEST_TEMPLATE = "ZO_QuestJournal_Gamepad_MenuEntryTemplate"
local QUEST_HEADER_TEMPLATE = "ZO_QuestJournal_Gamepad_MenuEntryHeaderTemplate"
local SELECTED_QUEST_TEXTURE = "EsoUI/Art/Journal/Gamepad/gp_trackedQuestIcon.dds"
ZO_QuestJournalManager_Gamepad = ZO_Object.MultiSubclass(ZO_QuestJournalManager_Shared, ZO_Gamepad_ParametricList_Screen)
function ZO_QuestJournalManager_Gamepad:New(...)
    local questJournalManager = ZO_QuestJournalManager_Shared.New(self)
    questJournalManager:Initialize(...)
    return questJournalManager
end
function ZO_QuestJournalManager_Gamepad:Initialize(control)
    ZO_Gamepad_ParametricList_Screen.Initialize(self, control)
    self.control = control
    self.sceneName = "gamepad_quest_journal"
    self.optionsSceneName = "gamepad_quest_journal_options"
    self:RegisterIconTexture(QUEST_TYPE_AVA, "EsoUI/Art/Journal/Gamepad/gp_questTypeIcon_AvA.dds")
    self:RegisterIconTexture(QUEST_TYPE_AVA_GRAND, "EsoUI/Art/Journal/Gamepad/gp_questTypeIcon_normal.dds")
    self:RegisterIconTexture(QUEST_TYPE_AVA_GROUP, "EsoUI/Art/Journal/Gamepad/gp_questTypeIcon_AvAGroup.dds")
    self:RegisterIconTexture(QUEST_TYPE_CLASS, "EsoUI/Art/Journal/Gamepad/gp_questTypeIcon_normal.dds")
    self:RegisterIconTexture(QUEST_TYPE_CRAFTING, "EsoUI/Art/Journal/Gamepad/gp_questTypeIcon_crafting.dds")
    self:RegisterIconTexture(QUEST_TYPE_DUNGEON, "EsoUI/Art/Journal/Gamepad/gp_questTypeIcon_dungeon.dds")
    self:RegisterIconTexture(QUEST_TYPE_GROUP, "EsoUI/Art/Journal/Gamepad/gp_questTypeIcon_group.dds")
    self:RegisterIconTexture(QUEST_TYPE_GUILD, "EsoUI/Art/Journal/Gamepad/gp_questTypeIcon_guild.dds")
    self:RegisterIconTexture(QUEST_TYPE_MAIN_STORY, "EsoUI/Art/Journal/Gamepad/gp_questTypeIcon_mainStory.dds")
    self:RegisterIconTexture(QUEST_TYPE_NONE, "EsoUI/Art/Journal/Gamepad/gp_questTypeIcon_normal.dds")
    self:RegisterIconTexture(QUEST_TYPE_QA_TEST, "EsoUI/Art/Journal/Gamepad/gp_questTypeIcon_normal.dds")
    self:RegisterIconTexture(QUEST_TYPE_RAID, "EsoUI/Art/Journal/Gamepad/gp_questTypeIcon_raid.dds")
    self.questList = self:GetMainList()
    self.optionsList = self:AddList("Options")
    self:SetupOptionsList(self.optionsList)
    self.contentHeader = control:GetNamedChild("MiddlePane"):GetNamedChild("Container").header
    self.conditionTextLabel = control:GetNamedChild("ConditionTextLabel")
    self.hintTextLabel = control:GetNamedChild("HintTextLabel")
    self.hintTextBulletList = ZO_BulletList:New(control:GetNamedChild("HintTextBulletList"), "ZO_QuestJournal_HintBulletLabel_Gamepad")
    self.conditionTextBulletList = ZO_BulletList:New(control:GetNamedChild("ConditionTextBulletList"), "ZO_QuestJournal_ConditionBulletLabel_Gamepad", nil, "ZO_QuestJournal_CompletedTaskIcon_Gamepad")
    self.optionalStepTextBulletList = ZO_BulletList:New(control:GetNamedChild("OptionalStepTextBulletList"), "ZO_QuestJournal_ConditionBulletLabel_Gamepad")
    local LINE_PADDING_Y = 11
    self.hintTextBulletList:SetLinePaddingY(LINE_PADDING_Y)
    self.conditionTextBulletList:SetLinePaddingY(LINE_PADDING_Y)
    self.optionalStepTextBulletList:SetLinePaddingY(LINE_PADDING_Y)
    local BULLET_PADDING_X = 34
    self.hintTextBulletList:SetBulletPaddingX(BULLET_PADDING_X)
    self.conditionTextBulletList:SetBulletPaddingX(BULLET_PADDING_X)
    self.optionalStepTextBulletList:SetBulletPaddingX(BULLET_PADDING_X)
    GAMEPAD_QUEST_JOURNAL_OPTIONS_FRAGMENT = self:GetListFragment(self.optionsList)
    ZO_GamepadGenericHeader_Initialize(self.header, ZO_GAMEPAD_HEADER_TABBAR_DONT_CREATE, ZO_GAMEPAD_HEADER_LAYOUTS.DATA_PAIRS_SEPARATE)
    self.headerData =
    {
        titleText = GetString(SI_QUEST_JOURNAL_MENU_JOURNAL),
         data1HeaderText = GetString(SI_GAMEPAD_MAIN_MENU_JOURNAL_QUESTS),
         data1Text = function() return zo_strformat(SI_GAMEPAD_QUEST_JOURNAL_CURRENT_MAX, GetNumJournalQuests(), MAX_JOURNAL_QUESTS) end,
    }
    ZO_GamepadGenericHeader_Initialize(self.contentHeader, ZO_GAMEPAD_HEADER_TABBAR_DONT_CREATE, ZO_GAMEPAD_HEADER_LAYOUTS.CONTENT_HEADER_DATA_PAIRS_LINKED)
    self.contentHeaderData =
    {
        titleText = function()
            local questData = self:GetSelectedQuestData()
            if questData then
                local questName, _, _, _, _, _, _, _, _, questType = GetJournalQuestInfo(questData.questIndex)
                local conColorDef = ZO_ColorDef:New(GetConColor(questData.level))
                questName = conColorDef:Colorize(zo_strformat(SI_QUEST_JOURNAL_QUEST_NAME_FORMAT, questName))
                questName = zo_iconTextFormat(self:GetIconTexture(questType), 40, 40, questName)
                if self.focusedQuestIndex == questData.questIndex then
                    questName = zo_iconTextFormat(SELECTED_QUEST_TEXTURE, 32, 32, questName)
                end
                return questName
            end
        end,
         data1HeaderText = GetString(SI_GAMEPAD_QUEST_JOURNAL_QUEST_LEVEL),
         data1Text = function()
            local questData = self:GetSelectedQuestData()
            if questData then
                return tostring(questData.level)
            end
        end,
        data2Text = function()
            return self:GetQuestDataString()
        end,
        data3Text = function()
            return select(2, self:GetQuestDataString())
        end,
    }
    ZO_QuestJournalManager_Shared.Initialize(self, control)
end
do
    local groupIcon = zo_iconFormat("EsoUI/Art/Journal/Gamepad/gp_questTypeIcon_group.dds", 32, 32)
    local raidIcon = zo_iconFormat("EsoUI/Art/Journal/Gamepad/gp_questTypeIcon_raid.dds", 32, 32)
    local soloIcon = zo_iconFormat("EsoUI/Art/Journal/Gamepad/gp_questTypeIcon_normal.dds", 32, 32)
    local instanceDisplayStrings = {
        [INSTANCE_DISPLAY_TYPE_GROUP] = zo_strformat(SI_GAMEPAD_QUEST_JOURNAL_INSTANCE_TYPE_GROUP, groupIcon),
        [INSTANCE_DISPLAY_TYPE_GROUP_DELVE] = "",
        [INSTANCE_DISPLAY_TYPE_NONE] = "",
        [INSTANCE_DISPLAY_TYPE_RAID] = zo_strformat(SI_GAMEPAD_QUEST_JOURNAL_INSTANCE_TYPE_RAID, raidIcon),
        [INSTANCE_DISPLAY_TYPE_SOLO] = zo_strformat(SI_GAMEPAD_QUEST_JOURNAL_INSTANCE_TYPE_SOLO, soloIcon),
    }
    function ZO_QuestJournalManager_Gamepad:GetQuestDataString()
        local returnVals = {}
        local questData = self:GetSelectedQuestData()
        if questData then
            local repeatableType = GetJournalQuestRepeatType(questData.questIndex)
            if repeatableType ~= QUEST_REPEAT_NOT_REPEATABLE then
                table.insert(returnVals, GetString(SI_GAMEPAD_QUEST_JOURNAL_REPEATABLE_TEXT))
            end
            if questData.dataSource then
                local instanceDisplayType = questData.dataSource.displayType
                table.insert(returnVals, instanceDisplayStrings[instanceDisplayType])
            end
        end
        return unpack(returnVals)
    end
end
function ZO_QuestJournalManager_Gamepad:PerformDeferredInitialization()
    if self.initialized then return end
    -- TODO.
    self.initialized = true
end
function ZO_QuestJournalManager_Gamepad:OnSelectionChanged(list, selectedData, oldSelectedData)
    KEYBIND_STRIP:UpdateKeybindButtonGroup(self.mainKeybindStripDescriptor)
    self:RefreshDetails()
end
function ZO_QuestJournalManager_Gamepad:SetupList(list)
    local function QuestEntryTemplateSetup(control, data, selected, selectedDuringRebuild, enabled, activated)
        ZO_SharedGamepadEntry_OnSetup(control, data, selected, selectedDuringRebuild, enabled, activated)
        local conColorDef = ZO_ColorDef:New(GetConColor(data.level))
        control.label:SetColor(conColorDef:UnpackRGBA())
        control.selectedIcon:SetTexture(SELECTED_QUEST_TEXTURE)
        control.selectedIcon:SetHidden(self.focusedQuestIndex ~= data.questIndex)
    end
    list:AddDataTemplate(QUEST_TEMPLATE, QuestEntryTemplateSetup, nil, nil, "Entry")
    list:AddDataTemplateWithHeader(QUEST_TEMPLATE, QuestEntryTemplateSetup, nil, nil, QUEST_HEADER_TEMPLATE, nil, "HeaderEntry")
end
function ZO_QuestJournalManager_Gamepad:SetupOptionsList(list)
    list:SetOnSelectedDataChangedCallback(function(list, selectedData)
        KEYBIND_STRIP:UpdateKeybindButtonGroup(self.optionsKeybindStripDescriptor)
    end)
    list:AddDataTemplate("ZO_GamepadSubMenuEntryTemplate", ZO_SharedGamepadEntry_OnSetup)
end
function ZO_QuestJournalManager_Gamepad:InitializeKeybindStripDescriptors()
    -- Main keybind strip
    self.mainKeybindStripDescriptor =
    {
        alignment = KEYBIND_STRIP_ALIGN_LEFT,
        -- Select
        {
            name = GetString(SI_GAMEPAD_SELECT_OPTION),
            keybind = "UI_SHORTCUT_PRIMARY",
            callback = function()
                local selectedQuestIndex = self:GetSelectedQuestIndex()
                self:FocusQuestWithIndex(selectedQuestIndex)
            end,
            visible = function()
                local selectedQuestIndex = self:GetSelectedQuestIndex()
                if selectedQuestIndex then
                    return true
                end
                return false
            end
        },
        -- Map
        {
            name = GetString(SI_QUEST_JOURNAL_SHOW_ON_MAP),
            keybind = "UI_SHORTCUT_SECONDARY",
            callback = function()
                local selectedQuestIndex = self:GetSelectedQuestIndex()
                if selectedQuestIndex then
                    self:ShowOnMap(selectedQuestIndex)
                end
            end,
            visible = function()
                local selectedQuestIndex = self:GetSelectedQuestIndex()
                if selectedQuestIndex then
                    return true
                end
                return false
            end
        },
        -- Options
        {
            name = GetString(SI_GAMEPAD_QUEST_JOURNAL_OPTIONS),
            keybind = "UI_SHORTCUT_TERTIARY",
            callback = function()
                self:ShowOptions(self:GetSelectedQuestIndex())
            end,
            visible = function()
                local selectedQuestIndex = self:GetSelectedQuestIndex()
                if selectedQuestIndex and (self:CanAbandonQuest() or self:CanShareQuest()) then
                    return true
                end
                return false
            end
        },
    }
    ZO_Gamepad_AddListTriggerKeybindDescriptors(self.mainKeybindStripDescriptor, self.questList)
    ZO_Gamepad_AddBackNavigationKeybindDescriptors(self.mainKeybindStripDescriptor, GAME_NAVIGATION_TYPE_BUTTON)
    -- Options keybind strip
    self.optionsKeybindStripDescriptor =
    {
        alignment = KEYBIND_STRIP_ALIGN_LEFT,
        -- Do action
        {
            keybind = "UI_SHORTCUT_PRIMARY",
            name = function()
                return GetString(SI_GAMEPAD_SELECT_OPTION)
            end,
            
            callback = function()
                local selectedData = self.optionsList:GetSelectedData()
                if selectedData then
                    selectedData.action()
                end
            end,
            visible = function()
                local selectedData = self.optionsList:GetSelectedData()
                return selectedData ~= nil and selectedData.enabled()
            end
        },
    }
    ZO_Gamepad_AddListTriggerKeybindDescriptors(self.optionsKeybindStripDescriptor, self.optionsList)
    ZO_Gamepad_AddBackNavigationKeybindDescriptors(self.optionsKeybindStripDescriptor, GAME_NAVIGATION_TYPE_BUTTON)
end
function ZO_QuestJournalManager_Gamepad:InitializeScenes()
    local returningFromOptions = false
    
    GAMEPAD_QUEST_JOURNAL_ROOT_SCENE = ZO_Scene:New(self.sceneName, SCENE_MANAGER)
    GAMEPAD_QUEST_JOURNAL_ROOT_SCENE:RegisterCallback("StateChange", function(oldState, newState)
        if newState == SCENE_SHOWING then
            self:PerformDeferredInitialization()
            
            self:UpdateFocusedQuest()
            self:RefreshQuestList()
            self:SetCurrentList(self.questList)
            ZO_GamepadGenericHeader_Refresh(self.header, self.headerData)
            ZO_GamepadGenericHeader_Refresh(self.contentHeader, self.contentHeaderData)
            if not returningFromOptions then
                if self.focusedQuestIndex then
                    self:SelectFocusedQuest()
                elseif not self.questList:IsEmpty() then
                    self.questList:SetSelectedIndex(1)
                end
            else
                returningFromOptions = false
            end
            self:SetKeybindButtonGroup(self.mainKeybindStripDescriptor)
        elseif newState == SCENE_HIDDEN then
            self.questList:Deactivate()
            self:SetKeybindButtonGroup(nil)
        end
    end)
    GAMEPAD_QUEST_JOURNAL_OPTIONS_SCENE = ZO_Scene:New(self.optionsSceneName, SCENE_MANAGER)
    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)
end
function ZO_QuestJournalManager_Gamepad:GetSelectedQuestData()
    return self.questList:GetSelectedData()
end
function ZO_QuestJournalManager_Gamepad:SelectFocusedQuest()
    self.questList:SetSelectedDataByEval(function(data)
        return data.questIndex == self.focusedQuestIndex
    end)
end
function ZO_QuestJournalManager_Gamepad:PerformUpdate()
    self.dirty = false
end
function ZO_QuestJournalManager_Gamepad:RefreshQuestCount()
    self:Update()
end
local function UpdateListAnchors(control, attachedTo)
    control:SetAnchor(TOPLEFT, attachedTo, BOTTOMLEFT, 50, yOffset)
    control:SetAnchor(TOPRIGHT, attachedTo, BOTTOMRIGHT, 0, 21)
end
function ZO_QuestJournalManager_Gamepad:RefreshDetails()
    ZO_QuestJournalManager_Shared.RefreshDetails(self)
    ZO_GamepadGenericHeader_Refresh(self.contentHeader, self.contentHeaderData)
    local questData = self:GetSelectedQuestData()
    self.questInfoContainer:SetHidden(not questData)
    self.questStepContainer:SetHidden(not questData)
    if questData then
        local _, bgText, stepText, stepType, stepOverrideText, completed, _, _, _, _, _ = GetJournalQuestInfo(questData.questIndex)
        self.conditionTextBulletList:Clear()
        self.optionalStepTextBulletList:Clear()
        self.hintTextBulletList:Clear()
        local questIndex = questData.questIndex
        local questStrings = self.questStrings
        ZO_ClearNumericallyIndexedTable(questStrings)
        if completed then
            local goalCondition, _, _, _, goalBackgroundText, goalDescription = GetJournalQuestEnding(questIndex)
       
            self.bgText:SetText(goalBackgroundText)
            self.stepText:SetText(goalDescription)
            self.conditionTextBulletList:AddLine(goalCondition)
            self.optionalStepTextLabel:SetHidden(true)
            if self.hintTextLabel then
                self.hintTextLabel:SetHidden(true)
            end
        else
            self.bgText:SetText(bgText)
            self.stepText:SetText(stepText)
            ZO_ClearNumericallyIndexedTable(questStrings)
            local showMultipleOrSteps = self:DoesShowMultipleOrSteps(stepOverrideText, stepType, questIndex)
            self.conditionTextLabel:SetText(showMultipleOrSteps and GetString(SI_GAMEPAD_QUEST_JOURNAL_QUEST_OR_DESCRIPTION) or GetString(SI_QUEST_JOURNAL_QUEST_TASKS))
            self:BuildTextForTasks(stepOverrideText, questIndex, questStrings)
            for k, v in ipairs(questStrings) do
                self.conditionTextBulletList:AddLine(v.name, v.isComplete)
            end
            ZO_ClearNumericallyIndexedTable(questStrings)
            self:BuildTextForStepVisibility(questIndex, QUEST_STEP_VISIBILITY_OPTIONAL)
            self.optionalStepTextLabel:SetHidden(#questStrings == 0)
            for i = 1, #questStrings do
                self.optionalStepTextBulletList:AddLine(questStrings[i])
            end
            ZO_ClearNumericallyIndexedTable(questStrings)
            local anchorToControl = self.optionalStepTextLabel:IsControlHidden() and self.conditionTextBulletList.control or self.optionalStepTextBulletList.control
            UpdateListAnchors(self.hintTextLabel, anchorToControl, 0)
            self:BuildTextForStepVisibility(questIndex, QUEST_STEP_VISIBILITY_HINT)
            if self.hintTextLabel then
                self.hintTextLabel:SetHidden(#questStrings == 0)
            end
            for i = 1, #questStrings do
                self.hintTextBulletList:AddLine(questStrings[i])
            end
        end
    end
end
function ZO_QuestJournalManager_Gamepad:RefreshOptionsList()
    self.optionsList:Clear()
    local options = {}
    local shareQuest = ZO_GamepadEntryData:New(GetString(SI_QUEST_JOURNAL_SHARE))
    shareQuest.action = function()
                local selectedQuestIndex = self:GetSelectedQuestIndex()
                if selectedQuestIndex then
                    ZO_QuestJournal_ShareQuest(selectedQuestIndex)
                end
            end
    shareQuest.enabled = function()
                return self:CanShareQuest()
            end
    table.insert(options, shareQuest)
            
    local abandonQuest = ZO_GamepadEntryData:New(GetString(SI_QUEST_JOURNAL_ABANDON))
    abandonQuest.action = function()
                local selectedQuestIndex = self:GetSelectedQuestIndex()
                if selectedQuestIndex then
                    ZO_Quest_ConfirmAbandonQuest(selectedQuestIndex)
                end
            end
    abandonQuest.enabled = function()
                return self:CanAbandonQuest()
            end
    table.insert(options, abandonQuest)
    for _, option in pairs(options) do
        self.optionsList:AddEntry("ZO_GamepadSubMenuEntryTemplate", option)
    end
    self.optionsList:Commit()
    self.options = options
end
function ZO_QuestJournalManager_Gamepad:RefreshQuestList()
    local quests, _, _ = self:GetQuestListData()
    -- If we're showing the options menu, make sure we still have the quest that we're viewing options for
    if SCENE_MANAGER:IsShowing(self.optionsSceneName) then
        local hasQuest = false
        for i, quest in ipairs(quests) do
            if quest.questIndex == self.showingOptionsForQuestIndex then
                hasQuest = true
            end
        end
        if not hasQuest then
            -- Quest is no longer available...back out of the options menu
            SCENE_MANAGER:HideCurrentScene()
        end
    end
    self.questList:Clear()
    local lastCategoryName
    for i, quest in ipairs(quests) do
        local nextQuest = quests[i + 1]
        local entry = ZO_GamepadEntryData:New(quest.name, self:GetIconTexture(quest.questType))
        entry:SetDataSource(quest)
        entry:SetFontScaleOnSelection(false)
        if quest.categoryName ~= lastCategoryName then
            lastCategoryName = quest.categoryName
            entry:SetHeader(quest.categoryName)
            self.questList:AddEntryWithHeader(QUEST_TEMPLATE, entry)
        else
            self.questList:AddEntry(QUEST_TEMPLATE, entry)
        end
    end
    self.questList:Commit()
end
function ZO_QuestJournalManager_Gamepad:ShowOptions(questIndex)
    self.showingOptionsForQuestIndex = questIndex
    SCENE_MANAGER:Push(self.optionsSceneName)
end
function ZO_QuestJournalManager_Gamepad:FocusQuestWithIndex(index)
    self:SetFocusIndex(index)
    
    self:FireCallbacks("QuestSelected", index)
    -- The quest tracker performs focus logic on quest/remove/update, only force focus if the player has clicked on the quest through the journal UI
    if SCENE_MANAGER:IsShowing(self.sceneName) then
        QUEST_TRACKER:ForceAssist(index)
    end
    self:RefreshDetails()
end
function ZO_QuestJournalManager_Gamepad:SetKeybindButtonGroup(descriptor)
    if self.currentKeybindButtonGroup then
        KEYBIND_STRIP:RemoveKeybindButtonGroup(self.currentKeybindButtonGroup)
    end
    if descriptor then
        KEYBIND_STRIP:AddKeybindButtonGroup(descriptor)
    end
    self.currentKeybindButtonGroup = descriptor
end
    GAMEPAD_QUEST_JOURNAL_MANAGER = ZO_QuestJournalManager_Gamepad:New(control)
    SYSTEMS:RegisterGamepadObject("questJournal", GAMEPAD_QUEST_JOURNAL_MANAGER)
end