|
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 |
--Section containing the numerical XP Progress local xpProgressStatValuePair = xpProgressSection:AcquireStatValuePair(self:GetStyle("statValuePair")) xpProgressStatValuePair:SetStat(GetString(SI_STAT_GAMEPAD_EXPERIENCE_LABEL), self:GetStyle("statValuePairStat")) --Status bar representing the xp progress values --This is not used for companions so just hide it --First, grab the level information for this companion if isMaxLevel then --If the companion is at max level, we show something different xpProgressStatValuePair:SetValue(GetString(SI_EXPERIENCE_LIMIT_REACHED), self:GetStyle("statValuePairValue")) --Since the companion is at max level, we want the bar to be totally filled, so just set something arbitrary to reflect that else --Calculate the percentage value for the companion's current experience, and then populate both the bar and xp progress values xpProgressStatValuePair:SetValue(zo_strformat(SI_EXPERIENCE_CURRENT_MAX_PERCENT, ZO_CommaDelimitNumber(currentXpInLevel), ZO_CommaDelimitNumber(totalXpInLevel), percentageXp), self:GetStyle("statValuePairValue")) end --Section containing the name of the companion's passive perk ability local passivePerkTitleSection = self:AcquireSection(self:GetStyle("companionOverviewStatValueSection")) local passivePerkPair = passivePerkTitleSection:AcquireStatValuePair(self:GetStyle("statValuePair")) --Section containing the description of the companion's passive perk ability passivePerkBodySection:AddLine(formattedPerkDescription, self:GetStyle("companionOverviewDescription")) -- Grab the rapport information for the active companion --Section containing the player's current rapport level with the companion local rapportStatusSection = self:AcquireSection(self:GetStyle("companionOverviewStatValueSection")) rapportStatusPair:SetStat(GetString(SI_COMPANION_RAPPORT_STATUS), self:GetStyle("statValuePairStat")) rapportStatusPair:SetValue(GetString("SI_COMPANIONRAPPORTLEVEL", rapportLevel), self:GetStyle("statValuePairValue")) --Section containing the rapport bar --The rapport bar is a special type of status bar, so we have to create as a custom control and set it up manually --Add the rapport bar in between the two rapport icons rapportBarSection:AddTexture("EsoUI/Art/HUD/lootHistory_icon_rapportDecrease_generic.dds", self:GetStyle("companionRapportTexture")) rapportBarSection:AddTexture("EsoUI/Art/HUD/lootHistory_icon_rapportIncrease_generic.dds", self:GetStyle("companionRapportTexture")) --Section containing the description for the companion's current rapport levelend |