Back to Home

ESO Lua File v100030

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
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")
    if not ZO_PLATFORM_ALLOWS_CHAPTER_CODE_ENTRY[GetPlatformServiceType()] 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)
    end
end
function ChapterUpgrade_Keyboard:UpgradeButtonClicked()
    local IS_STANDARD_EDITION = false
    ZO_ShowChapterUpgradePlatformDialog(IS_STANDARD_EDITION, CHAPTER_UPGRADE_SOURCE_PREGAME)
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