ESO Lua File v100010

ingame/fence/gamepad/fence_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
--[[
---- Lifecycle
--]]
ZO_Fence_Gamepad = ZO_Fence_Base:Subclass()
function ZO_Fence_Gamepad:New(...)
    return ZO_Fence_Base.New(self, ...)
end
function ZO_Fence_Gamepad:Initialize(control)
    self.sceneName = GAMEPAD_STORE_SCENE_NAME
    -- Call base initialize
    ZO_Fence_Base.Initialize(self, control)
    SYSTEMS:RegisterGamepadObject("fence", self)
end
--[[
---- Callbacks
--]]
function ZO_Fence_Gamepad:OnOpened(sellsUsed, laundersUsed)
    if IsInGamepadPreferredMode() then
        STORE_WINDOW_GAMEPAD:SetActiveComponents(ZO_MODE_STORE_SELL_STOLEN, ZO_MODE_STORE_LAUNDER)
        SCENE_MANAGER:Show(self.sceneName)
    end
end
function ZO_Fence_Gamepad:OnSellSuccess()
    FENCE_SELL_GAMEPAD:OnSuccess()
end
function ZO_Fence_Gamepad:OnLaunderSuccess()
    FENCE_LAUNDER_GAMEPAD:OnSuccess()
end
function ZO_Fence_Gamepad:IsLaundering()
    local currentMode = STORE_WINDOW_GAMEPAD:GetCurrentMode()
    return currentMode == ZO_MODE_STORE_LAUNDER
end
--[[
---- Global
--]]
    FENCE_GAMEPAD = ZO_Fence_Gamepad:New(control)
end