Back to Home

ESO Lua File v100035

ingame/lorelibrary/gamepad/library_common_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
--[[Basic screen]]--
ZO_LoreLibraryBookSetGamepad = ZO_Gamepad_ParametricList_Screen:Subclass()
function ZO_LoreLibraryBookSetGamepad:New(...)
    return ZO_Gamepad_ParametricList_Screen.New(self, ...)
end
function ZO_LoreLibraryBookSetGamepad:Initialize(control)
    ZO_Gamepad_ParametricList_Screen.Initialize(self, control, false)
    self.itemList = ZO_Gamepad_ParametricList_Screen.GetMainList(self)
    self.headerData = {
            titleText = GetString(SI_WINDOW_TITLE_LORE_LIBRARY),
            data1HeaderText = "",
            data1Text = "",
        }
end
function ZO_LoreLibraryBookSetGamepad:InitializeEvents()
    local function OnInitialized()
        if self.control:IsControlHidden() then
            self.dirty = true
        else
            self:Update()
        end
    end
    local function OnBookLearned(eventCode, categoryIndex, collectionIndex, bookIndex)
        if self.control:IsControlHidden() then
            self.dirty = true
        else
            self:Update()
        end
    end
    self.control:RegisterForEvent(EVENT_LORE_LIBRARY_INITIALIZED, OnInitialized)
    self.control:RegisterForEvent(EVENT_LORE_BOOK_LEARNED, OnBookLearned)
end