Back to Home

ESO Lua File v101044

ingame/dyeing/gamepad/dyeing_saved_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
    control.multiFocusControl = control:GetNamedChild("Dyes")
    control.dyeControls = control.multiFocusControl.dyeControls
    control.singleFocusControl = control.dyeControls[1]
    control.highlight = control:GetNamedChild("SharedHighlight")
    control.switchIcon = control:GetNamedChild("SwitchIcon")
    control.dyeSelector = ZO_GamepadFocus:New(control, nil, MOVEMENT_CONTROLLER_DIRECTION_HORIZONTAL)
    control.dyeSelector:SetFocusChangedCallback(function(entry) ZO_Dyeing_Gamepad_Highlight(control, entry and entry.control) end)
    for i=1, #control.dyeControls do
        local dyeControl = control.dyeControls[i]
        local entry = {
                        control = dyeControl,
                        slotIndex = i,
                    }
        control.dyeSelector:AddEntry(entry)
    end
    control.Activate = function(control, retainFocus)
                if not retainFocus then
                    control.dyeSelector:SetFocusByIndex(1)
                end
                control.dyeSelector:Activate(retainFocus)
            end
    control.Deactivate = function(control, ...)
                control.dyeSelector:Deactivate(...)
            end
end