Back to Home

ESO Lua File v101042

pregameandingame/tooltip/settingstooltips.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
---------------------------------------
-- Settings Tooltip Functions
---------------------------------------
function ZO_Tooltip:LayoutSettingAccountResendActivation(hasActivatedEmail, accountEmail)
    self:AddLine(GetString(SI_INTERFACE_OPTIONS_ACCOUNT_RESEND_ACTIVATION_TOOLTIP_LABEL), self:GetStyle("statValuePairStat"))
    local emailText = accountEmail
    if emailText == "" then
        emailText = GetString(SI_INTERFACE_OPTIONS_ACCOUNT_NO_EMAIL_TEXT)
    end
    local statValueSection = self:AcquireSection(self:GetStyle("accountValueStatsSection"))
    statValueSection:AddLine(emailText)
    self:AddSection(statValueSection)
    if not hasActivatedEmail then
        local warningSection = self:AcquireSection(self:GetStyle("bodySection"), self:GetStyle("bodyDescription"))
        warningSection:AddLine(GetString(SI_INTERFACE_OPTIONS_ACCOUNT_NEED_ACTIVE_ACCOUNT_WARNING), self:GetStyle("failed"))
        self:AddSection(warningSection)
        local bodySection = self:AcquireSection(self:GetStyle("bodySection"), self:GetStyle("bodyDescription"))
        local resendActivationOptionText = ZO_SELECTED_TEXT:Colorize(GetString(SI_INTERFACE_OPTIONS_ACCOUNT_RESEND_ACTIVATION))
        bodySection:AddLine(zo_strformat(SI_INTERFACE_OPTIONS_ACCOUNT_RESEND_ACTIVATION_TOOLTIP_TEXT, resendActivationOptionText))
        self:AddSection(bodySection)
    end
end
function ZO_Tooltip:LayoutSettingAccountGetUpdates(hasActivatedEmail)
    self:AddLine(GetString(SI_INTERFACE_OPTIONS_ACCOUNT_GET_UPDATES_TOOLTIP_TITLE), self:GetStyle("title"))
    if not hasActivatedEmail then
        local warningSection = self:AcquireSection(self:GetStyle("bodySection"), self:GetStyle("bodyDescription"))
        warningSection:AddLine(GetString(SI_INTERFACE_OPTIONS_ACCOUNT_NEED_ACTIVE_ACCOUNT_WARNING), self:GetStyle("failed"))
        self:AddSection(warningSection)
    end
    local bodySection = self:AcquireSection(self:GetStyle("bodySection"), self:GetStyle("bodyDescription"))
    bodySection:AddLine(GetString(SI_INTERFACE_OPTIONS_ACCOUNT_GET_UPDATES_TOOLTIP_TEXT))
    self:AddSection(bodySection)
end
function ZO_Tooltip:LayoutSettingAccessibilityTooltipWarning(mainText, warningText, shouldDisplayWarning)
    local bodySection = self:AcquireSection(self:GetStyle("bodySection"), self:GetStyle("bodyDescription"))
    local text
    if not shouldDisplayWarning then
        text = mainText
    else
        local colorizedWarningText = ZO_ERROR_COLOR:Colorize(warningText)
        text = zo_strformat(SI_OPTIONS_ACCESSIBILITY_MODE_TOOLTIP_WARNING_FORMAT, mainText, colorizedWarningText)
    end
    bodySection:AddLine(text, self:GetStyle("bodyDescription"))
    self:AddSection(bodySection)
end
function ZO_Tooltip:LayoutSettingTooltip(tooltipText, warningText)
    local bodySection = self:AcquireSection(self:GetStyle("bodySection"))
    bodySection:AddLine(tooltipText, self:GetStyle("bodyDescription"))
    self:AddSection(bodySection)
    if warningText then
        local warningSection = self:AcquireSection(self:GetStyle("bodySection"))
        warningSection:AddLine(warningText, self:GetStyle("bodyDescription"), self:GetStyle("failed"))
        self:AddSection(warningSection)
    end
end