ESO Lua File v100010

libraries/zo_dialog/gamepad/zo_dialog_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
56
57
58
59
60
61
62
63
64
65
    local parent = self:GetParent()
    local maxButtonIndex
    local maxButton
    for i = 1, parent:GetNumChildren() do
        local child = parent:GetChild(i)
        local customButtonIndex = child.customButtonIndex
        if(customButtonIndex ~= nil) then
            if(maxButtonIndex == nil or customButtonIndex > maxButtonIndex) then
                maxButtonIndex = customButtonIndex
                maxButton = child
            end
        end
    end
    if(maxButton) then
        self:SetAnchor(TOPLEFT, maxButton, TOPRIGHT, BUTTON_SPACING, 0)
    else
        self:SetAnchor(BOTTOMLEFT, nil, BOTTOMLEFT, 25, -15)
    end
    if(maxButtonIndex) then
        self.customButtonIndex = maxButtonIndex + 1
    else
        self.customButtonIndex = 1
    end
end
    DIRECTIONAL_INPUT:Consume(ZO_DI_LEFT_STICK, ZO_DI_RIGHT_STICK, ZO_DI_DPAD)
end
    -- enable this dialog to take control of all directional input
    self.Activate = function() DIRECTIONAL_INPUT:Activate(self) end
    self.Deactivate = function() DIRECTIONAL_INPUT:Deactivate(self) end
end
    if not self.animation then
        self.animation = ANIMATION_MANAGER:CreateTimelineFromVirtual("DialogModalUnderlay", self)
    end
    self.animation:PlayFromStart()
    PushActionLayerByName(GetString(SI_KEYBINDINGS_LAYER_DIALOG))
    self:Activate()
end
    RemoveActionLayerByName(GetString(SI_KEYBINDINGS_LAYER_DIALOG))
    self:Deactivate()
end
    -- enable this dialog to take control of all directional input
    self.Activate = function() DIRECTIONAL_INPUT:Activate(self) end
    self.Deactivate = function() DIRECTIONAL_INPUT:Deactivate(self) end
    
end