Back to Home

ESO Lua File v100031

ingame/dyeing/gamepad/dyestamp_confirmation_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
ZO_DyeStamp_Confirmation_Gamepad = ZO_DyeStamp_Confirmation_Base:Subclass()
function ZO_DyeStamp_Confirmation_Gamepad:New(...)
    return ZO_DyeStamp_Confirmation_Base.New(self, ...)
end
function ZO_DyeStamp_Confirmation_Gamepad:Initialize(control)
    DYE_STAMP_CONFIRMATION_GAMEPAD_SCENE = ZO_Scene:New("dyeStampConfirmationGamepad", SCENE_MANAGER)
    SYSTEMS:RegisterGamepadRootScene("dyeStampConfirmation", DYE_STAMP_CONFIRMATION_GAMEPAD_SCENE)
    ZO_DyeStamp_Confirmation_Base.Initialize(self, control, DYE_STAMP_CONFIRMATION_GAMEPAD_SCENE)
end
function ZO_DyeStamp_Confirmation_Base:AddExitKey()
    -- Special exit button
    local exit = {
        alignment = KEYBIND_STRIP_ALIGN_LEFT,
        name = GetString(SI_EXIT_BUTTON),
        keybind = "UI_SHORTCUT_NEGATIVE",
        callback = function() self:EndConfirmation() end,
    }
    table.insert(self.keybindStripDescriptor, exit)
end
function ZO_DyeStamp_Confirmation_Gamepad:OnShown()
    ZO_DyeStamp_Confirmation_Base.OnShown(self)
    DIRECTIONAL_INPUT:Activate(self, self.control)
end
function ZO_DyeStamp_Confirmation_Gamepad:OnHidden()
    ZO_DyeStamp_Confirmation_Base.OnHidden(self)
    DIRECTIONAL_INPUT:Deactivate(self)
end
function ZO_DyeStamp_Confirmation_Gamepad:UpdateDirectionalInput()
    -- Camera Spin.
    local x = DIRECTIONAL_INPUT:GetX(ZO_DI_RIGHT_STICK)
    if x ~= 0 then
        BeginItemPreviewSpin()
        self.isSpinning = true
    else
        if self.isSpinning then
            EndItemPreviewSpin()
            self.isSpinning = false
        end
    end
end
    DYESTAMP_CONFIRMATION_GAMEPAD = ZO_DyeStamp_Confirmation_Gamepad:New(control)
    SYSTEMS:RegisterGamepadObject("dyeStamp_Confirmation", DYESTAMP_CONFIRMATION_GAMEPAD)
end