Back to Home

ESO Lua File v100023

internalingame/market/marketdialogs_shared.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
ZO_BUY_SUBSCRIPTION_URL_TYPE = { urlType = APPROVED_URL_ESO_ACCOUNT_SUBSCRIPTION }
ZO_BUY_SUBSCRIPTION_FRONT_FACING_ADDRESS = {mainTextParams = { GetString(SI_ESO_PLUS_SUBSCRIPTION_LINK_TEXT), GetString(SI_URL_APPLICATION_WEB) }}
ZO_BUY_CROWNS_URL_TYPE = {urlType = APPROVED_URL_ESO_ACCOUNT_STORE}
ZO_BUY_CROWNS_FRONT_FACING_ADDRESS = {mainTextParams = {GetString(SI_MARKET_INSUFFICIENT_FUNDS_LINK_TEXT), GetString(SI_URL_APPLICATION_WEB)}}
    OpenURLByType(dialog.data.urlType)
end
    local helpCategory, helpIndex = GetGiftingAccountLockedHelpIndices()
    RequestShowSpecificHelp(helpCategory, helpIndex)
end
    local data = dialog.data
    local gracePeriodTimeLeftS = GetGiftingGracePeriodTime()
    -- update every second
    if data.gracePeriodTimeLeftS == nil or data.gracePeriodTimeLeftS ~= gracePeriodTimeLeftS then
        data.gracePeriodTimeLeftS = gracePeriodTimeLeftS
        local timeLeftString = ZO_FormatTime(gracePeriodTimeLeftS, TIME_FORMAT_STYLE_SHOW_LARGEST_TWO_UNITS, TIME_FORMAT_PRECISION_TWELVE_HOUR)
        ZO_Dialogs_UpdateDialogMainText(dialog, nil, {timeLeftString})
    end
end
    return giftResult == MARKET_PURCHASE_RESULT_CANNOT_GIFT_TO_PLAYER or giftResult == MARKET_PURCHASE_RESULT_CANNOT_GIFT_RECIPIENT_NOT_FOUND
end
do
    local TEXTURE_SCALE_PERCENT = 100
        local keybindString
        local key, mod1, mod2, mod3, mod4 = GetIngameHighestPriorityActionBindingInfoFromName("SHOW_HOUSING_PANEL", IsInGamepadPreferredMode())
        if key ~= KEY_INVALID then
            keybindString = ZO_Keybindings_GetBindingStringFromKeys(key, mod1, mod2, mod3, mod4, KEYBIND_TEXT_OPTIONS_FULL_NAME, KEYBIND_TEXTURE_OPTIONS_EMBED_MARKUP, TEXTURE_SCALE_PERCENT, TEXTURE_SCALE_PERCENT)
        else
            keybindString = ZO_Keybindings_GenerateKeyMarkup(GetString(SI_ACTION_IS_NOT_BOUND))
        end
        -- The display name of a MarketProductCollectible is the name of the collectible
        local houseName = GetMarketProductDisplayName(marketProductId)
        houseName = ZO_SELECTED_TEXT:Colorize(houseName)
        return {houseName, keybindString}
    end
end
ESO_Dialogs["CROWN_STORE_PREVIEW_HOUSE"] =
{
    gamepadInfo =
    {
        dialogType = GAMEPAD_DIALOGS.BASIC,
    },
    title =
    {
        text = SI_MARKET_PREVIEW_HOUSE_TITLE
    },
    mainText =
    {
        text = SI_MARKET_PREVIEW_HOUSE_TEXT
    },
    buttons =
    {
        [1] =
        {
            text = SI_DIALOG_CONFIRM,
            callback =  function(dialog)
                            local houseId = GetMarketProductHouseId(dialog.data.marketProductId)
                            RequestJumpToHouse(houseId)
                            SCENE_MANAGER:RequestShowLeaderBaseScene()
                        end,
            keybind = "DIALOG_PRIMARY",
        },
        [2] =
        {
            text = SI_DIALOG_CANCEL,
            keybind = "DIALOG_NEGATIVE",
        },
    },
}