Back to Home

ESO Lua File v100036

ingame/guildfinder/gamepad/guildfinder_panel_gamepadbehavior.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
-----------------------------------------
-- Guild Finder Panel Gamepad Behavior --
-----------------------------------------
ZO_GuildFinder_Panel_GamepadBehavior = ZO_CallbackObject:Subclass()
function ZO_GuildFinder_Panel_GamepadBehavior:New(...)
    local object = ZO_CallbackObject.New(self)
    object:Initialize(...)
    return object
end
function ZO_GuildFinder_Panel_GamepadBehavior:Initialize(control)
    self.isActive = false
end
function ZO_GuildFinder_Panel_GamepadBehavior:InitializeKeybinds()
    local function OnBack()
        PlaySound(SOUNDS.GAMEPAD_MENU_BACK)
        self:EndSelection()
    end
    self.keybindStripDescriptor =
    {
        alignment = KEYBIND_STRIP_ALIGN_LEFT,
    }
    ZO_Gamepad_AddBackNavigationKeybindDescriptors(self.keybindStripDescriptor, GAME_NAVIGATION_TYPE_BUTTON, OnBack)
end
function ZO_GuildFinder_Panel_GamepadBehavior:EndSelection()
    self:FireCallbacks("PanelSelectionEnd", self)
end
function ZO_GuildFinder_Panel_GamepadBehavior:Activate()
    self.isActive = true
    KEYBIND_STRIP:AddKeybindButtonGroup(self.keybindStripDescriptor)
end
function ZO_GuildFinder_Panel_GamepadBehavior:Deactivate()
    self.isActive = false
    KEYBIND_STRIP:RemoveKeybindButtonGroup(self.keybindStripDescriptor)
end
function ZO_GuildFinder_Panel_GamepadBehavior:IsActive()
    return self.isActive
end
function ZO_GuildFinder_Panel_GamepadBehavior:CanBeActivated()
    return true -- Should be overridden for non-interactive panels
end