Back to Home

ESO Lua File v100029

ingame/guildfinder/guildbrowser_managefilters_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
55
56
57
ZO_GuildBrowser_ManageFilters_Shared = ZO_CallbackObject:Subclass()
function ZO_GuildBrowser_ManageFilters_Shared:New(...)
    local object = ZO_CallbackObject.New(self)
    object:Initialize(...)
    return object
end
function ZO_GuildBrowser_ManageFilters_Shared:Initialize(control)
    self.control = control
    self.isSetToDefaultFilterTable = {}
end
function ZO_GuildBrowser_ManageFilters_Shared:SetFilterValueIsDefaultByAttributeType(attributeType, isDefault)
    local oldDefaultState = self:AreFiltersSetToDefault()
    self.isSetToDefaultFilterTable[attributeType] = not isDefault and attributeType or nil
    if oldDefaultState ~= self:AreFiltersSetToDefault() then
        self:FireCallbacks("OnGuildBrowserFilterValueIsDefaultChanged")
    end
end
function ZO_GuildBrowser_ManageFilters_Shared:GetHasGuildTraderDefault()
    return false
end
function ZO_GuildBrowser_ManageFilters_Shared:GetComboBoxEntrySelectionDefault()
    return false
end
function ZO_GuildBrowser_ManageFilters_Shared:GetMinCPDefault()
    return 0
end
function ZO_GuildBrowser_ManageFilters_Shared:GetMaxCPDefault()
    return ZO_GuildFinder_Manager.GetMaxCPAllowedForInput()
end
function ZO_GuildBrowser_ManageFilters_Shared:GetTimeDefault(isGamepad)
    if isGamepad then
        return 1
    else
        return 0
    end
end
function ZO_GuildBrowser_ManageFilters_Shared:AreFiltersSetToDefault()
    return next(self.isSetToDefaultFilterTable) == nil
end
function ZO_GuildBrowser_ManageFilters_Shared:ResetFiltersToDefault()
    self.isSetToDefaultFilterTable = {}
end