Back to Home

ESO Lua File v100032

ingame/guildfinder/guildrecruitment_blacklist_shared.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
------------------
-- Guild Finder --
------------------
ZO_GUILD_RECRUITMENT_BLACKLIST_ENTRY_TYPE = 1
ZO_GUILD_RECRUITMENT_BLACKLIST_ENTRY_SORT_KEYS =
{
    ["name"] = { },
}
ZO_GuildRecruitment_Blacklist_Shared = ZO_GuildRecruitment_Shared:Subclass()
function ZO_GuildRecruitment_Blacklist_Shared:New(...)
    return ZO_GuildRecruitment_Shared.New(self, ...)
end
function ZO_GuildRecruitment_Blacklist_Shared:Initialize(control)
    ZO_GuildRecruitment_Shared.Initialize(self, control)
    local function OnGuildBlacklistResultsReady()
        if self:GetFragment():IsShowing() then
            self:RefreshData()
        end
    end
    GUILD_RECRUITMENT_MANAGER:RegisterCallback("GuildBlacklistResultsReady", OnGuildBlacklistResultsReady)
end
function ZO_GuildRecruitment_Blacklist_Shared:OnShowing()
    self:RefreshData()
end
function ZO_GuildRecruitment_Blacklist_Shared:FilterScrollList()
    local scrollData = ZO_ScrollList_GetDataList(self.list)
    ZO_ClearNumericallyIndexedTable(scrollData)
    local numBlacklist = GetNumGuildBlacklistEntries(self.guildId)
    for i = 1, numBlacklist do
        local accountName, note = GetGuildBlacklistInfoAt(self.guildId, i)
        local data =
        {
            guildId = self.guildId,
            index = i,
            name = accountName,
            note = note,
        }
        table.insert(scrollData, ZO_ScrollList_CreateDataEntry(ZO_GUILD_RECRUITMENT_BLACKLIST_ENTRY_TYPE, data))
    end
end
function ZO_GuildRecruitment_Blacklist_Shared:SetupRow(control, data)
    local nameLabel = control:GetNamedChild("Name")
    nameLabel:SetText(data.name)
end