Back to Home

ESO Lua File v100029

ingame/contacts/gamepad/ignorelist_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
-----------------
-- Ignore List
-----------------
local IgnoreList_Gamepad = ZO_GamepadSocialListPanel:Subclass()
function IgnoreList_Gamepad:New(...)
    return ZO_GamepadSocialListPanel.New(self, ...)
end
function IgnoreList_Gamepad:Initialize(control)
    ZO_GamepadSocialListPanel.Initialize(self, control, IGNORE_LIST_MANAGER, "ZO_GamepadIgnoreListRow")
    self:SetTitle(GetString(SI_GAMEPAD_CONTACTS_IGNORED_LIST_TITLE))
    self:SetEmptyText(GetString(SI_GAMEPAD_CONTACTS_IGNORE_LIST_NO_ENTRIES_MESSAGE));
    self:SetupSort(IGNORE_LIST_ENTRY_SORT_KEYS, "displayName", ZO_SORT_ORDER_UP)
    GAMEPAD_IGNORED_LIST_SCENE = ZO_Scene:New("gamepad_ignored", SCENE_MANAGER)
    GAMEPAD_IGNORED_LIST_SCENE:AddFragment(self:GetListFragment())
end
function IgnoreList_Gamepad:GetAddKeybind()
    local keybind  =
    {
        alignment = KEYBIND_STRIP_ALIGN_LEFT,
        name = GetString(SI_GAMEPAD_CONTACTS_ADD_IGNORE_BUTTON_LABEL),
        keybind = "UI_SHORTCUT_SECONDARY",
        callback = function()
            ZO_Dialogs_ShowGamepadDialog("GAMEPAD_SOCIAL_ADD_IGNORE_DIALOG", nil)
        end,
    }
    return keybind
end
function IgnoreList_Gamepad:OnShowing()
    IGNORE_LIST_MANAGER:RefreshData()
    self:Activate()
    ZO_GamepadSocialListPanel.OnShowing(self)
end
function IgnoreList_Gamepad:BuildOptionsList()
    local groupId = self:AddOptionTemplateGroup(ZO_SocialOptionsDialogGamepad.GetDefaultHeader)
    self:AddOptionTemplate(groupId, ZO_SocialOptionsDialogGamepad.BuildRemoveIgnoreOption)
    self:AddOptionTemplate(groupId, ZO_SocialOptionsDialogGamepad.BuildGamerCardOption, IsConsoleUI)
end
function IgnoreList_Gamepad:RefreshTooltip()
    --overridden to do nothing
end
    ZO_IGNORE_LIST_GAMEPAD = IgnoreList_Gamepad:New(self)
end