|
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 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 |
local QUEST_BULLET_ICON = "EsoUI/Art/Miscellaneous/Gamepad/gp_bullet.dds"-- TODO: These icons may need to be shifted to gamepad icons.local GROUP_LEADER_ICON = "EsoUI/Art/Compass/groupLeader.dds"local CURRENT_PLAYER_ICON = "EsoUI/Art/Icons/mapKey/mapKey_player.dds"local GROUP_MEMBER_ICON = "EsoUI/Art/Icons/mapKey/mapKey_groupMember.dds"local COMPANION_ICON = "EsoUI/Art/MapPins/activeCompanion_pin.dds"local TOOLTIP_MONEY_FORMAT--Section GeneratorsZO_MapInformationTooltip_Gamepad_Mixin = {}function ZO_MapInformationTooltip_Gamepad_Mixin:LayoutIconStringLine(baseSection, icon, string, ...) local lineSection = baseSection:AcquireSection(self.tooltip:GetStyle("mapLocationTooltipContentSection")) local iconStyle else endendfunction ZO_MapInformationTooltip_Gamepad_Mixin:LayoutKeybindStringLine(baseSection, actionName, formatString, ...) local lineSection = baseSection:AcquireSection(self.tooltip:GetStyle("mapLocationTooltipContentSection")) local DEFAULT_NO_TEXTURE = nil lineSection:AddKeybindLine(actionName, formatString, self.tooltip:GetStyle("mapLocationTooltipContentLabel"), ...)endfunction ZO_MapInformationTooltip_Gamepad_Mixin:LayoutLargeIconStringLine(baseSection, icon, string, ...) local iconStyle else end local lineSection = baseSection:AcquireSection(self.tooltip:GetStyle("mapLocationTooltipContentSection"))end local lineSection = baseSection:AcquireSection(self.tooltip:GetStyle("mapLocationTooltipContentSection"))endfunction ZO_MapInformationTooltip_Gamepad_Mixin:LayoutIconStringRightStringLine(baseSection, icon, string, rightString, ...) local iconStyle else end local lineSection = baseSection:AcquireSection(self.tooltip:GetStyle("mapLocationTooltipContentSection"))end local iconStyle else end local lineSection = baseSection:AcquireSection(self.tooltip:GetStyle("mapLocationTooltipContentSection")) local textSection = lineSection:AcquireSection(self.tooltip:GetStyle("mapLocationHeaderTextSection"))end local isPlayer = unitTag == "player" local isCompanion = unitTag == "companion" elseif isPlayer then elseif isGrouped then elseif isCompanion then end local colorStyle if isGrouped or isPlayer then else colorStyle = { fontColorType = INTERFACE_COLOR_TYPE_UNIT_REACTION_COLOR, } end self:LayoutIconStringLine(self.tooltip, icon, ZO_FormatUserFacingDisplayName(text), colorStyle, self.tooltip:GetStyle("keepBaseTooltipContent")) else self:LayoutStringLine(self.tooltip, ZO_FormatUserFacingDisplayName(text), colorStyle, self.tooltip:GetStyle("keepBaseTooltipContent")) endend local colorStyle = self.tooltip:GetStyle(isFocusedQuest and "mapQuestFocused" or "mapQuestNonFocused") self:LayoutIconStringLine(self.tooltip, QUEST_BULLET_ICON, text, colorStyle, self.tooltip:GetStyle("keepBaseTooltipContent"))endfunction ZO_MapInformationTooltip_Gamepad_Mixin:AppendQuestCondition(questIndex, stepIndex, conditionIndex) local colorStyle = self.tooltip:GetStyle(isFocusedQuest and "mapQuestFocused" or "mapQuestNonFocused") self:LayoutIconStringLine(self.tooltip, QUEST_BULLET_ICON, text, colorStyle, self.tooltip:GetStyle("keepBaseTooltipContent")) endendendfunction ZO_MapInformationTooltip_Gamepad_Mixin:AppendAvAObjective(queryType, keepId, objectiveId, objectivePinTier) local text, interfaceColorType, color = GenerateAvAObjectiveConditionTooltipLine(queryType, keepId, objectiveId, objectivePinTier) local objectiveColorStyle = { fontColorType = interfaceColorType, } self:LayoutIconStringLine(self.tooltip, nil, text, objectiveColorStyle, self.tooltip:GetStyle("keepBaseTooltipContent"))endfunction ZO_MapInformationTooltip_Gamepad_Mixin:AddMoney(baseSection, amount, reason, notEnough, ...) -- Lazy setup of the local money format as the global one is not available at the time this file is loaded. if not TOOLTIP_MONEY_FORMAT then TOOLTIP_MONEY_FORMAT.font = "ZoFontGamepad42" TOOLTIP_MONEY_FORMAT.iconSize = 40 end local lineSection = baseSection:AcquireSection(self.tooltip:GetStyle("mapLocationTooltipDoubleContentSection")) if reason then end if amount > 0 then lineSection:AddSimpleCurrency(CURT_MONEY, amount, TOOLTIP_MONEY_FORMAT, CURRENCY_DONT_SHOW_ALL, notEnough, ...) endend local wayshrineSection = self.tooltip:AcquireSection(self.tooltip:GetStyle("mapLocationTooltipSection")) local known, name, _, _, icon, glowIcon, poiType, isShown, linkedCollectibleIsLocked = GetFastTravelNodeInfo(nodeIndex) --TODO: Implement a tooltip for linkedCollectibleIsLocked self:LayoutIconStringLine(wayshrineSection, icon, zo_strformat(SI_WORLD_MAP_LOCATION_NAME, name), self.tooltip:GetStyle("mapLocationTooltipWayshrineHeader")) local isCurrentLoc = (currentNodeIndex == nodeIndex) local isUsingRecall = currentNodeIndex == nil local nodeIsHousePreview = poiType == POI_TYPE_HOUSE and not HasCompletedFastTravelNodePOI(nodeIndex) if isCurrentLoc then --NO BUTTON: Can't travel to origin self:LayoutIconStringLine(wayshrineSection, nil, zo_strformat(SI_TOOLTIP_WAYSHRINE_CURRENT_LOC, name), self.tooltip:GetStyle("mapKeepAt"), self.tooltip:GetStyle("keepBaseTooltipContent")) self:LayoutIconStringLine(wayshrineSection, nil, zo_strformat(SI_TOOLTIP_WAYSHRINE_CANT_RECALL_AVA, name), self.tooltip:GetStyle("mapKeepInaccessible"), self.tooltip:GetStyle("keepBaseTooltipContent")) elseif isOutboundOnly then --NO BUTTON: Can't travel to this wayshrine, only from it self:LayoutIconStringLine(wayshrineSection, nil, message, self.tooltip:GetStyle("mapKeepInaccessible"), self.tooltip:GetStyle("keepBaseTooltipContent")) elseif not CanLeaveCurrentLocationViaTeleport() then --NO BUTTON: Current Zone or Subzone restricts jumping local cantLeaveStringId cantLeaveStringId = SI_TOOLTIP_WAYSHRINE_CANT_RECALL_OUTLAW_REFUGE else cantLeaveStringId = SI_TOOLTIP_WAYSHRINE_CANT_RECALL_FROM_LOCATION end self:LayoutIconStringLine(wayshrineSection, nil, GetString(cantLeaveStringId), self.tooltip:GetStyle("mapKeepInaccessible"), self.tooltip:GetStyle("keepBaseTooltipContent")) local currencyIcon end self:LayoutIconStringLine(wayshrineSection, currencyIcon, ZO_WorldMap_GetWayshrineTooltipCollectibleLockedText(pin), self.tooltip:GetStyle("mapLocationTooltipWayshrineLinkedCollectibleLockedText")) self:LayoutIconStringLine(wayshrineSection, nil, message, self.tooltip:GetStyle("mapKeepInaccessible"), self.tooltip:GetStyle("keepBaseTooltipContent")) elseif isUsingRecall then --Recall local travelStringId = nodeIsHousePreview and SI_GAMEPAD_TOOLTIP_WAYSHRINE_PREVIEW_HOUSE_INTERACT or SI_GAMEPAD_TOOLTIP_WAYSHRINE_RECALL_INTERACT self:LayoutKeybindStringLine(wayshrineSection, "UI_SHORTCUT_PRIMARY", travelStringId, self.tooltip:GetStyle("mapKeepAccessible"), self.tooltip:GetStyle("keepBaseTooltipContent")) if premiumTimeLeft == 0 then --BUTTON: Recall if cost > 0 then self:AddMoney(wayshrineSection, cost, GetString(SI_GAMEPAD_WORLD_MAP_TOOLTIP_RECALL_COST), not hasEnoughMoney, self.tooltip:GetStyle("mapLocationTooltipContentLeftLabel"), self.tooltip:GetStyle("mapRecallCost")) end else --NO BUTTON: Waiting on cooldown local cooldownText = zo_strformat(SI_TOOLTIP_WAYSHRINE_RECALL_COOLDOWN, ZO_FormatTimeMilliseconds(premiumTimeLeft, TIME_FORMAT_STYLE_DESCRIPTIVE, TIME_FORMAT_PRECISION_SECONDS)) self:LayoutIconStringLine(wayshrineSection, nil, cooldownText, self.tooltip:GetStyle("mapKeepInaccessible"), self.tooltip:GetStyle("keepBaseTooltipContent")) end else --BUTTON: Fast Travel local travelStringId = nodeIsHousePreview and SI_GAMEPAD_TOOLTIP_WAYSHRINE_PREVIEW_HOUSE_INTERACT or SI_GAMEPAD_TOOLTIP_WAYSHRINE_FAST_TRAVEL_INTERACT self:LayoutKeybindStringLine(wayshrineSection, "UI_SHORTCUT_PRIMARY", travelStringId, self.tooltip:GetStyle("mapKeepAccessible"), self.tooltip:GetStyle("keepBaseTooltipContent")) endend if shortDescription then self:LayoutIconStringLine(self.tooltip, QUEST_BULLET_ICON, shortDescription, self.tooltip:GetStyle("keepBaseTooltipContent")) endend self:LayoutStringLine(keepUpgradeSection, description, self.tooltip:GetStyle("keepUpgradeTooltipContent"))end if antiquityData then self:LayoutStringLine(antiquitiesSection, digSiteString, self.tooltip:GetStyle("keepBaseTooltipContent")) end endendend local nameFormat = pin:IsPublicDungeonPin() and SI_WORLD_MAP_PUBLIC_DUNGEON_NAME or SI_WORLD_MAP_DELVE_NAME if skyshardId ~= 0 then self:LayoutStringLine(delveSection, zo_strformat(SI_WORLD_MAP_SKYSHARD_HINT_FORMATTER, hint), self.tooltip:GetStyle("delveSkyshardHint")) self:LayoutStringLine(delveSection, zo_strformat(SI_WORLD_MAP_SKYSHARD_STATUS_FORMATTER, GetString("SI_SKYSHARDDISCOVERYSTATUS", skyshardDiscoveryStatus)), self.tooltip:GetStyle("delveSkyshardHint")) endend for alliance = ALLIANCE_ITERATION_BEGIN, ALLIANCE_ITERATION_END do if numKills > 0 then local allianceIcon = allianceColor:Colorize(zo_iconFormatInheritColor(ZO_GetAllianceIcon(alliance), 24, 48)) self:LayoutStringLine(statsSection, zo_strformat(SI_KILL_LOCATION_TOOLTIP_ALLIANCE_KILLS, allianceIcon, allianceName, numKills), statsStyle) end endend -- Header -- Phase Complete local phaseCompleteString = zo_strformat(SI_SPECTACLE_EVENTS_PHASE_COMPLETE_FORMATTER, currentPhase) bodySection:AddLine(phaseCompleteString, tooltip:GetStyle("bodyDescription"), tooltip:GetStyle("whiteFontColor")) -- Next Phase local nextPhaseBeginsString = SPECTACLE_EVENTS_MANAGER:GetActiveSpectacleEventNextPhaseBeginsString(spectacleId) if nextPhaseBeginsString then end else -- Phase Header local phaseHeader = zo_strformat(SI_SPECTACLE_EVENTS_PHASE_NUMBER_AND_NAME_FORMATTER, currentPhase, phaseDisplayName) -- Phase Status Bar end -- Phase Description endenddo local TEAM_TYPE_TO_ZONE_DISPLAY_TYPE = { [TEAM_TYPE_BATTLEGROUND] = ZONE_DISPLAY_TYPE_BATTLEGROUND, [TEAM_TYPE_ADVENTURE_ZONE] = ZONE_DISPLAY_TYPE_ADVENTURE_ZONE, } local zoneDisplayType = TEAM_TYPE_TO_ZONE_DISPLAY_TYPE[teamType] if zoneDisplayType then scoresSection:AddLine(GetString("SI_ZONEDISPLAYTYPE", zoneDisplayType), tooltip:GetStyle("teamScoresHeader")) end -- Currently all team types have 3 teams. If we ever actually go to support this for BGs, we'll want to consider 2 vs 3 team BGs. for teamValue = 1, 3 do end endendend |