|
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 |
local CHECKED_ICON = "EsoUI/Art/Inventory/Gamepad/gp_inventory_icon_equipped.dds"
local UNCHECKED_ICON = "EsoUI/Art/Miscellaneous/Gamepad/gp_bullet_ochre.dds"
objectives = {}
local name, openingText, closingText, objectiveOrder, discovered, completed = GetCadwellZonePOIInfo(progressionLevel, zoneIndex, objectiveIndex)
table.insert(objectives, {name=name, openingText=openingText, closingText=closingText, order=objectiveOrder, discovered=discovered, completed=completed})
end
for i=1, #objectives do
local objectiveInfo = objectives[i]
local openingText = objectiveInfo.openingText
local closingText = objectiveInfo.closingText
local discovered = objectiveInfo.discovered
local completed = objectiveInfo.completed
-- Extract the actual information we want to display based on the state of the objective.
local icon
local style
if discovered and completed then
icon = CHECKED_ICON
style = "cadwellObjectiveComplete"
elseif discovered and (not completed) then
icon = UNCHECKED_ICON
style = "cadwellObjectiveActive"
else
icon = UNCHECKED_ICON
style = "cadwellObjectiveInactive"
end
local objectiveContainerSection = objectivesSection:AcquireSection(self:GetStyle("cadwellObjectiveContainerSection"))
-- Add the bullet icon to the tooltip.
local textureContainerSection = objectiveContainerSection:AcquireSection(self:GetStyle("cadwellTextureContainer"))
-- Add the information to the tooltip.
local objectiveSection = objectiveContainerSection:AcquireSection(self:GetStyle("cadwellObjectiveSection"))
objectiveSection:AddLine(zo_strformat(SI_CADWELL_OBJECTIVE_FORMAT, name, text), self:GetStyle(style))
end
end |