ESO Lua File v100014

ingame/tooltip/grouptooltips.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
function ZO_Tooltip:LayoutGroupTooltip(title, bodyText, errorText)
    local titleSection = self:AcquireSection(self:GetStyle("groupTitleSection"))
    titleSection:AddLine(title, self:GetStyle("title"))
    self:AddSection(titleSection)
    local bodySection = self:AcquireSection(self:GetStyle("groupBodySection"), self:GetStyle("bodySection"))
    if errorText then
        bodySection:AddLine(errorText, self:GetStyle("groupDescription"), self:GetStyle("groupDescriptionError"))
    end
    bodySection:AddLine(bodyText, self:GetStyle("groupDescription"))
    self:AddSection(bodySection)
end
function ZO_Tooltip:LayoutDungeonDifficultyTooltip()
    local hasControlOfDifficulty, difficultyControlReason = CanPlayerChangeGroupDifficulty()
    local titleText = GetString(SI_GAMEPAD_GROUP_DUNGEON_DIFFICULTY)
    local bodyText = GetString(SI_DUNGEON_DIFFICULTY_HELP_TOOLTIP)
    local difficultyControlText = GetString("SI_GROUPDIFFICULTYCHANGEREASON", difficultyControlReason)
    local difficultyControlStyle = hasControlOfDifficulty and "succeeded" or "groupDescriptionError"
    local titleSection = self:AcquireSection(self:GetStyle("groupTitleSection"))
    titleSection:AddLine(titleText, self:GetStyle("title"))
    self:AddSection(titleSection)
    local bodySection = self:AcquireSection(self:GetStyle("groupBodySection"), self:GetStyle("bodySection"))
    bodySection:AddLine(difficultyControlText, self:GetStyle("groupDescription"), self:GetStyle(difficultyControlStyle))
    bodySection:AddLine(bodyText, self:GetStyle("groupDescription"))
    self:AddSection(bodySection)
end
do
    local textRolesGeneralDescription = GetString(SI_GROUP_PREFERRED_ROLE_DESCRIPTION)
    function ZO_Tooltip:LayoutGroupRole(textTitle, textBody)
        self:LayoutGroupTooltip(textTitle, textBody)
        local section = self:AcquireSection(self:GetStyle("bodySection"))
        section:AddLine(textRolesGeneralDescription, self:GetStyle("bodyDescription"))
    
        self:AddSection(section)
    end
end