Back to Home

ESO Lua File v100019

pregame/chapterupgrade/keyboard/chapterupgrade_keyboard.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
local ChapterUpgrade_Keyboard = ZO_ChapterUpgrade_Shared:Subclass()
function ChapterUpgrade_Keyboard:New(...)
    return ZO_ChapterUpgrade_Shared.New(self, ...)
end
function ChapterUpgrade_Keyboard:Initialize(control)
    ZO_ChapterUpgrade_Shared.Initialize(self, control, "chapterUpgradeKeyboard")
    local serviceType = GetPlatformServiceType()
    if serviceType == PLATFORM_SERVICE_TYPE_DMM or serviceType == PLATFORM_SERVICE_TYPE_STEAM then
        -- We don't have access to any sort of code entry on these platforms, so just hide the controls
        local enterCodeButton = control:GetNamedChild("EnterCodeButton")
        enterCodeButton:SetHidden(true)
        local textContainer = control:GetNamedChild("TextContainer")
        local codeEntryContainerControl = textContainer:GetNamedChild("CodeEntryContainer")
        codeEntryContainerControl:SetHidden(true)
    end
end
function ChapterUpgrade_Keyboard:UpgradeButtonClicked()
    ZO_Dialogs_ShowDialog("CHAPTER_UPGRADE_STORE")
end
local ACCOUNT_PAGE_TEXT_PARAMS = { mainTextParams = { GetString(SI_ESO_ACCOUNT_PAGE_LINK_TEXT) }}
function ChapterUpgrade_Keyboard:EnterCodeButtonClicked()
    ZO_Dialogs_ShowDialog("SHOW_REDEEM_CODE", nil, ACCOUNT_PAGE_TEXT_PARAMS)
end
    CHAPTER_UPGRADE_SCREEN_KEYBOARD = ChapterUpgrade_Keyboard:New(control)
end