Back to Home

ESO Lua File v101044

ingame/tooltip/activityfindertooltips.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
function ZO_Tooltip:LayoutZoneStoryActivityCompletion(zoneData, completionType)
    local headerSection = self:AcquireSection(self:GetStyle("topSection"))
    headerSection:AddLine(GetString("SI_ZONECOMPLETIONTYPE", completionType), self:GetStyle("title"))
    headerSection:AddLine(zoneData.name)
    self:AddSection(headerSection)
    local statValuePair = self:AcquireStatValuePair(self:GetStyle("statValuePair"))
    statValuePair:SetStat(GetString("SI_ZONECOMPLETIONTYPE_PROGRESSHEADER", completionType), self:GetStyle("statValuePairStat"))
    statValuePair:SetValue(ZO_ZoneStories_Manager.GetActivityCompletionProgressText(zoneData.id, completionType), self:GetStyle("statValuePairValue"))
    self:AddStatValuePair(statValuePair)
    local bodySection = self:AcquireSection(self:GetStyle("bodySection"))
    bodySection:AddLine(GetString("SI_ZONECOMPLETIONTYPE_DESCRIPTION", completionType), self:GetStyle("flavorText"))
    self:AddSection(bodySection)
end
function ZO_Tooltip:LayoutZoneStoryActivityCompletionTypeList(zoneData, completionType)
    -- Title
    local titleTextSection = self:AcquireSection(self:GetStyle("topSection"))
    titleTextSection:AddLine(zo_strformat(SI_ZONE_STORY_LIST_TOOLTIP_TITLE_FORMATTER, zoneData.name, GetString("SI_ZONECOMPLETIONTYPE", completionType)), self:GetStyle("title"))
    self:AddSection(titleTextSection)
    -- Checkboxes
    local numUnblockedActivities, blockingBranchErrorStringId = select(3, ZO_ZoneStories_Manager.GetActivityCompletionProgressValues(zoneData.id, completionType))
    local activityListSection = self:AcquireSection(self:GetStyle("achievementCriteriaSection"))
    for i = 1, numUnblockedActivities do
        local name = GetZoneStoryActivityNameByActivityIndex(zoneData.id, completionType, i)
        local isComplete = IsZoneStoryActivityComplete(zoneData.id, completionType, i)
        activityListSection:AddSection(self:GetCheckboxSection(zo_strformat(SI_ZONE_STORY_LIST_TOOLTIP_ACTIVITY_NAME_FORMATTER, name), isComplete))
    end
    self:AddSection(activityListSection)
    if blockingBranchErrorStringId ~= 0 then
        local blockingBranchRequirementSection = self:AcquireSection(self:GetStyle("bodySection"))
        local errorStringText = GetErrorString(blockingBranchErrorStringId)
        blockingBranchRequirementSection:AddLine(errorStringText, self:GetStyle("flavorText"))
        self:AddSection(blockingBranchRequirementSection)
    end
end
    local title = data:GetTitle()
    local category = data:GetCategory()
    local ROLE_ICON_DIMENSION = 64
    local playerCountString, roleListString, roleListNarrations = ZO_GroupFinder_GroupListing_GetPlayerCountAndRoleStrings(data, ROLE_ICON_DIMENSION)
    -- Applied/DLC Required indicator
    local indicatorIcon = data:GetStatusIndicatorIcon()
    local indicatorText = data:GetStatusIndicatorText()
    if indicatorIcon and indicatorText then
        local indicatorSection = self:AcquireSection(self:GetStyle("topSection"))
        indicatorSection:AddLine(indicatorText)
        indicatorSection:AddTexture(indicatorIcon, self:GetStyle("groupFinderStatusIndicator"))
        self:AddSection(indicatorSection)
    end
    -- Title
    local titleTextSection = self:AcquireSection(self:GetStyle("title"))
    titleTextSection:AddLine(EscapeMarkup(title, ALLOW_MARKUP_TYPE_COLOR_ONLY))
    self:AddSection(titleTextSection)
    local ownerSection = self:AcquireSection(self:GetStyle("bodySection"))
    local displayName = data:GetOwnerDisplayName()
    local characterName = data:GetOwnerCharacterName()
    ownerSection:AddLine(GetString(SI_GROUP_FINDER_TOOLTIP_LISTING_OWNER_LABEL), self:GetStyle("bodyHeader"))
    ownerSection:AddLine(ZO_FormatUserFacingDisplayName(displayName, characterName), self:GetStyle("bodyDescription"))
    self:AddSection(ownerSection)
    -- Category/location
    local categorySection = self:AcquireSection(self:GetStyle("bodySection"))
    categorySection:AddLine(GetString("SI_GROUPFINDERCATEGORY", category), self:GetStyle("bodyHeader"))
    if category ~= GROUP_FINDER_CATEGORY_ENDLESS_DUNGEON and category ~= GROUP_FINDER_CATEGORY_CUSTOM then
        local firstText = category == GROUP_FINDER_CATEGORY_PVP and data:GetPrimaryOptionText() or data:GetSecondaryOptionText()
        local secondText = category == GROUP_FINDER_CATEGORY_PVP and data:GetSecondaryOptionText() or data:GetPrimaryOptionText()
        local optionsString = ZO_GenerateCommaSeparatedListWithoutAnd({ firstText, secondText})
        categorySection:AddLine(optionsString, self:GetStyle("bodyDescription"))
    end
    self:AddSection(categorySection)
    -- Role list
    local roleList = self:AcquireSection(self:GetStyle("bodySection"))
    roleList:AddLineWithCustomNarration(roleListString, roleListNarrations, self:GetStyle("bodyDescription"))
    -- Player count
    local playerCount = self:AcquireStatValuePair(self:GetStyle("statValuePair"))
    playerCount:SetStat(GetString(SI_GROUP_FINDER_TOOLTIP_PLAYER_LABEL), self:GetStyle("statValuePairStat"))
    playerCount:SetValue(playerCountString, self:GetStyle("statValuePairValue"))
    self:AddStatValuePair(playerCount)
    self:AddSection(roleList)
    -- Description
    local descriptionSection = self:AcquireSection(self:GetStyle("bodySection"))
    descriptionSection:AddLine(GetString(SI_GROUP_FINDER_TOOLTIP_DESCRIPTION_HEADER), self:GetStyle("bodyHeader"))
    descriptionSection:AddLine(EscapeMarkup(data:GetDescription(), ALLOW_MARKUP_TYPE_COLOR_ONLY), self:GetStyle("bodyDescription"))
    self:AddSection(descriptionSection)
    -- Flags
    local requirementTextYes = GetString(SI_DIALOG_YES)
    local requirementTextNo = GetString(SI_DIALOG_NO)
    local flagsSection = self:AcquireSection(self:GetStyle("bodySection"))
    local championPair = self:AcquireStatValuePair(self:GetStyle("statValuePair"))
    championPair:SetStat(zo_strformat(SI_GROUP_FINDER_CHAMPION_REQUIRED_TEXT, ZO_GetChampionIconMarkupString(ZO_GROUP_LISTING_CHAMPION_ICON_SIZE)), self:GetStyle("statValuePairStat"))
    local championRequirement = data:GetChampionPoints()
    if not data:DoesGroupRequireChampion() then
        championRequirement = GetString(SI_GROUP_FINDER_TOOLTIP_CHAMPION_NOT_APPLICABLE)
    end
    championPair:SetValue(championRequirement, self:GetStyle("statValuePairValue"))
    flagsSection:AddStatValuePair(championPair)
    local inviteCodePair = self:AcquireStatValuePair(self:GetStyle("statValuePair"))
    local requiresInviteCodeText = data:DoesGroupRequireInviteCode() and requirementTextYes or requirementTextNo
    inviteCodePair:SetStat(GetString(SI_GROUP_FINDER_TOOLTIP_INVITE_CODE_LABEL), self:GetStyle("statValuePairStat"))
    inviteCodePair:SetValue(requiresInviteCodeText, self:GetStyle("statValuePairValue"))
    flagsSection:AddStatValuePair(inviteCodePair)
    if category == GROUP_FINDER_CATEGORY_DUNGEON or category == GROUP_FINDER_CATEGORY_ARENA or category == GROUP_FINDER_CATEGORY_TRIAL then
        local playstylePair = self:AcquireStatValuePair(self:GetStyle("statValuePair"))
        playstylePair:SetStat(GetString(SI_GROUP_FINDER_TOOLTIP_PLAYSTYLE_LABEL), self:GetStyle("statValuePairStat"))
        playstylePair:SetValue(GetString("SI_GROUPFINDERPLAYSTYLE", data:GetPlaystyle()), self:GetStyle("statValuePairValue"))
        flagsSection:AddStatValuePair(playstylePair)
    end
    local autoAcceptPair = self:AcquireStatValuePair(self:GetStyle("statValuePair"))
    local autoAcceptsRequestsText = data:DoesGroupAutoAcceptRequests() and requirementTextYes or requirementTextNo
    autoAcceptPair:SetStat(GetString(SI_GROUP_FINDER_TOOLTIP_AUTO_ACCEPT_LABEL), self:GetStyle("statValuePairStat"))
    autoAcceptPair:SetValue(autoAcceptsRequestsText, self:GetStyle("statValuePairValue"))
    flagsSection:AddStatValuePair(autoAcceptPair)
    local VOIPPair = self:AcquireStatValuePair(self:GetStyle("statValuePair"))
    local requiresVOIPText = data:DoesGroupRequireVOIP() and requirementTextYes or requirementTextNo
    VOIPPair:SetStat(GetString(SI_GROUP_FINDER_TOOLTIP_VOIP_LABEL), self:GetStyle("statValuePairStat"))
    VOIPPair:SetValue(requiresVOIPText, self:GetStyle("statValuePairValue"))
    flagsSection:AddStatValuePair(VOIPPair)
    local lookingForPair = self:AcquireStatValuePair(self:GetStyle("statValuePair"))
    local lookingForText, lookingForNarrations = ZO_GroupFinder_GroupListing_GetDesiredRolesList(data, ROLE_ICON_DIMENSION)
    lookingForPair:SetStat(GetString(SI_GROUP_FINDER_TOOLTIP_LOOKING_FOR_LABEL), self:GetStyle("statValuePairStat"))
    lookingForPair:SetValueWithCustomNarration(lookingForText, lookingForNarrations, self:GetStyle("statValuePairValue"))
    flagsSection:AddStatValuePair(lookingForPair)
    self:AddSection(flagsSection)
    local warningText = data:GetWarningText()
    if warningText then
        local warningSection = self:AcquireSection(self:GetStyle("bodySection"))
        warningSection:AddLine(warningText, self:GetStyle("bodyDescription"), self:GetStyle("failed"))
        self:AddSection(warningSection)
    end
end
function ZO_Tooltip:LayoutGroupFinderApplicationDetails(applicationData)
    local displayName = applicationData:GetDisplayName()
    local characterName = applicationData:GetCharacterName()
    local primaryName = ZO_GetPrimaryPlayerName(displayName, characterName)
    local secondaryName = ZO_GetSecondaryPlayerName(displayName, characterName)
    
    -- Primary Name Header
    local headerSection = self:AcquireSection(self:GetStyle("socialTitle"))
    headerSection:AddLine(primaryName)
    self:AddSection(headerSection)
    -- Secondary Name
    local characterSection = self:AcquireSection(self:GetStyle("characterNameSection"))
    characterSection:AddLine(secondaryName, self:GetStyle("socialStatsValue"))
    self:AddSection(characterSection)
    local statsSection = self:AcquireSection(self:GetStyle("socialStatsSection"))
    -- Player Level
    local statValuePair = statsSection:AcquireStatValuePair(self:GetStyle("statValuePair"), self:GetStyle("fullWidth"))
    statValuePair:SetStat(GetString(SI_GAMEPAD_GROUP_FINDER_APPLICATION_LIST_HEADER_LEVEL), self:GetStyle("statValuePairStat"))
    local level = applicationData:GetLevel()
    local championPoints = applicationData:GetChampionPoints()
    local ICON_SIZE = 40
    local levelText = ZO_GetLevelOrChampionPointsString(level, championPoints, ICON_SIZE)
    local levelNarrationText = ZO_GetLevelOrChampionPointsNarrationString(level, championPoints)
    statValuePair:SetValueWithCustomNarration(levelText, levelNarrationText, self:GetStyle("socialStatsValue"))
    statsSection:AddStatValuePair(statValuePair)
    -- Player Class
    statValuePair = statsSection:AcquireStatValuePair(self:GetStyle("statValuePair"), self:GetStyle("fullWidth"))
    statValuePair:SetStat(GetString(SI_GROUP_LIST_PANEL_CLASS_HEADER), self:GetStyle("statValuePairStat"))
    statValuePair:SetValue(applicationData:GetClassName(), self:GetStyle("socialStatsValue"))
    statsSection:AddStatValuePair(statValuePair)
    -- Player Role
    statValuePair = statsSection:AcquireStatValuePair(self:GetStyle("statValuePair"), self:GetStyle("fullWidth"))
    statValuePair:SetStat(GetString(SI_GROUP_LIST_PANEL_ROLES_HEADER), self:GetStyle("statValuePairStat"))
    statValuePair:SetValue(GetString("SI_LFGROLE", applicationData:GetRole()), self:GetStyle("socialStatsValue"))
    statsSection:AddStatValuePair(statValuePair)
    self:AddSection(statsSection)
    -- Optional Message
    local bodySection = self:AcquireSection(self:GetStyle("bodySection"))
    bodySection:AddLine(applicationData:GetNote(), self:GetStyle("flavorText"))
    self:AddSection(bodySection)
end
function ZO_Tooltip:LayoutReportGroupFinderListingInfo(title, description, ownerDisplayName, ownerCharacterName)
    self:AddLine(GetString(SI_CUSTOMER_SERVICE_ASK_FOR_HELP_GROUP_FINDER_LISTING_DETAILS), self:GetStyle("title"))
    local ownerSection = self:AcquireSection(self:GetStyle("bodySection"))
    ownerSection:AddLine(GetString(SI_GROUP_FINDER_TOOLTIP_LISTING_OWNER_LABEL), self:GetStyle("bodyHeader"))
    ownerSection:AddLine(ZO_GetPrimaryPlayerNameWithSecondary(ownerDisplayName, ownerCharacterName), self:GetStyle("bodyDescription"))
    self:AddSection(ownerSection)
    local titleSection = self:AcquireSection(self:GetStyle("bodySection"))
    titleSection:AddLine(GetString(SI_GROUP_FINDER_TOOLTIP_TITLE_HEADER), self:GetStyle("bodyHeader"))
    titleSection:AddLine(EscapeMarkup(title, ALLOW_MARKUP_TYPE_COLOR_ONLY), self:GetStyle("bodyDescription"))
    self:AddSection(titleSection)
    local descriptionSection = self:AcquireSection(self:GetStyle("bodySection"))
    descriptionSection:AddLine(GetString(SI_GROUP_FINDER_TOOLTIP_DESCRIPTION_HEADER), self:GetStyle("bodyHeader"))
    descriptionSection:AddLine(EscapeMarkup(description, ALLOW_MARKUP_TYPE_COLOR_ONLY), self:GetStyle("bodyDescription"))
    self:AddSection(descriptionSection)
end
function ZO_Tooltip:LayoutReportHouseTourListingInfo(nickname, collectibleId, ownerDisplayName, additionalInstructions)
    self:AddLine(GetString(SI_CUSTOMER_SERVICE_ASK_FOR_HELP_HOUSE_TOUR_LISTING_DETAILS), self:GetStyle("title"))
    local ownerSection = self:AcquireSection(self:GetStyle("bodySection"))
    ownerSection:AddLine(GetString(SI_HOUSE_TOURS_REPORT_LISTING_TOOLTIP_OWNER_HEADER), self:GetStyle("bodyHeader"))
    ownerSection:AddLine(ownerDisplayName, self:GetStyle("bodyDescription"))
    self:AddSection(ownerSection)
    local nicknameSection = self:AcquireSection(self:GetStyle("bodySection"))
    nicknameSection:AddLine(GetString(SI_HOUSE_TOURS_REPORT_LISTING_TOOLTIP_NICKNAME_HEADER), self:GetStyle("bodyHeader"))
    nicknameSection:AddLine(EscapeMarkup(nickname, ALLOW_MARKUP_TYPE_COLOR_ONLY), self:GetStyle("bodyDescription"))
    self:AddSection(nicknameSection)
    if additionalInstructions and additionalInstructions ~= "" then
        local additionalInstructionsSection = self:AcquireSection(self:GetStyle("bodySection"))
        additionalInstructionsSection:AddLine(GetString(SI_GAMEPAD_HELP_CUSTOMER_SERVICE_TICKET_ADDITIONAL_INSTRUCTIONS_HEADER), self:GetStyle("bodyHeader"))
        additionalInstructionsSection:AddLine(EscapeMarkup(additionalInstructions, ALLOW_MARKUP_TYPE_COLOR_ONLY), self:GetStyle("bodyDescription"))
        self:AddSection(additionalInstructionsSection)
    end
end