WoWInterface SVN UrbanAchiever

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 134 to Rev 135
    Reverse comparison

Rev 134 → Rev 135

Main.lua
59,12 → 59,14
 
self.sortFuncs = {
["name d"] = function(a, b)
local _
_,a = GetAchievementInfo(a)
_,b = GetAchievementInfo(b)
return a < b
end,
 
["name a"] = function(a, b)
local _, a1, b1
_,a1 = GetAchievementInfo(a)
_,b1 = GetAchievementInfo(b)
assert(a1, "a "..a)
73,6 → 75,7
end,
 
["points d"] = function(a, b)
local _, a, b
if self.isAchList[GetAchievementCategory(a)] or self.isGuildList[GetAchievementCategory(a)] then
_,_,a = GetAchievementInfo(a)
else
87,6 → 90,7
end,
 
["points a"] = function(a, b)
local _, a, b
if self.isAchList[GetAchievementCategory(a)] or self.isGuildList[GetAchievementCategory(a)] then
_,_,a = GetAchievementInfo(a)
else
242,7 → 246,6
--self:PopulateAchievements("achievements")
--self:PopulateAchievements("statistics")
 
--self:CreateTracker()
self:SetupFrames()
 
UrbanAchiever:CreateOptions()
250,12 → 253,11
end
 
function self:PopulateAchieveList()
--self.achieveList = {}
for id = 1, MAX_ACHIEVEMENTS do
category = GetAchievementCategory(id)
local category = GetAchievementCategory(id)
if category and category ~= nil then
lastID = id
_, _, _, completed = GetAchievementInfo(id)
local lastID = id
local _, _, _, completed = GetAchievementInfo(id)
if not (UrbanAchiever.factionAchs[tostring(id)] and UrbanAchiever.factionAchs[tostring(id)] ~= playerFaction) then
if(type(self.achieveList[category]) == "table") then
table.insert(self.achieveList[category], id, completed)
265,14 → 267,13
end
end
end
--print(lastID)
end
 
function self:OnEnable()
self:RegisterEvent("ADDON_LOADED", "Initialize")
self:RegisterEvent("ACHIEVEMENT_EARNED", function(self1,arg1)
self:SetDisplayAchievement()
searchString = self:GetSearchString(arg1)
local searchString = self:GetSearchString(arg1)
self.masterList[arg1] = {
["searchString"] = searchString:lower(),
}
303,7 → 304,7
 
--Use a different button so InspectAchievements() doesnt get called. Easier hooking.
UnitPopupButtons["UA_ACHIEVEMENTS"] = { text = COMPARE_ACHIEVEMENTS, dist = 1 };
--Replace their Acheivement Button with mine.
--Replace their Achievement Button with mine.
for j = 1, #menuTypes do
local t = menuTypes[j]
for i = 1, #UnitPopupMenus[t] do
346,7 → 347,7
-------------------------------------------------------------
function self:UnitPopup_ShowMenu(dropdownMenu, which, unit, name, userData, ...)
for i=1, UIDROPDOWNMENU_MAXBUTTONS do
button = _G["DropDownList"..UIDROPDOWNMENU_MENU_LEVEL.."Button"..i];
local button = _G["DropDownList"..UIDROPDOWNMENU_MENU_LEVEL.."Button"..i];
if button.value == "UA_ACHIEVEMENTS" then
button.func = function()
self:SetComparisonUnit(unit)
499,11 → 500,11
completed = "";
end
--searchString will be used as a basis of the searching, instead of looping through all the sub-arrays
searchStr = name .. "; " .. points .. "; " .. completed .. "; " .. description .. "; " .. reward .. "; "
local searchStr = name .. "; " .. points .. "; " .. completed .. "; " .. description .. "; " .. reward .. "; "
 
--Add the criteria info
for a=1, GetAchievementNumCriteria(id) do
_, criteriaName = pcall(GetAchievementCriteriaInfo, id, a)
local _, criteriaName = pcall(GetAchievementCriteriaInfo, id, a)
searchStr = searchStr .. (criteriaName or "") .. "; "
end
--Add all the info to the master list
685,15 → 686,12
--Start with the frame and backdrop
self.frame = CreateFrame("Frame", "UrbanAchieverFrame", UIParent)
self.frame:SetBackdrop({
--bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", tile = true, tileSize = 32, edgeSize = 32,
--edgeFile = "Interface\\AchievementFrame\\UI-Achievement-WoodBorder", tile = true, tileSize = 32, edgeSize = 64,
insets = {left = 11, right = 12, top = 12, bottom = 11}
})
self.frame.backdrop = self.frame:CreateTexture("$parentBG", "BACKGROUND")
self.frame.backdrop:SetPoint("TOPLEFT", 6, -6)
self.frame.backdrop:SetPoint("BOTTOMRIGHT", -6, 6)
--self.frame.backdrop:SetTexture(0,0,0,1)
self.frame.backdrop:SetTexture("Interface\\AchievementFrame\\UI-Achievement-StatsBackground")
 
self.frame:SetWidth(632)
765,26 → 763,11
self.compHeaderText:SetText(UAComparing .. " [Name here]")
self.compHeaderText:SetPoint("RIGHT", self.compShield, "LEFT", -5, 2)
 
--Comparison Button
--[[
local compSetButton = CreateFrame("Button", "$parentComparisonSetButton", self.frame)
compSetButton:SetNormalTexture("Interface\\Buttons\\UI-SpellbookIcon-NextPage-Up")
compSetButton:SetPushedTexture("Interface\\Buttons\\UI-SpellbookIcon-NextPage-Down")
compSetButton:SetHighlightTexture("Interface\\Buttons\\ButtonHilight-Round", "ADD")
compSetButton:SetWidth(32)
compSetButton:SetHeight(32)
compSetButton:SetPoint("TOPRIGHT", self.frame, -8, -30)
compSetButton:SetScript("OnClick", function()
self:SetComparisonUnit("target")
end)
]]--
 
--Category Frame
self.frame.category = CreateFrame("Frame", "$parentCategoryFrame", self.frame)
self.frame.category:SetWidth(190)
self.frame.category:SetHeight(470)
self.frame.category:SetBackdrop({
--bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", tile = true, tileSize = 32, edgeSize = 32,
insets = {left = 11, right = 12, top = 12, bottom = 11}
})
793,7 → 776,6
self.frame.category.backdrop:SetPoint("BOTTOMRIGHT", -6, 6)
self.frame.category.backdrop:SetTexture("Interface\\AchievementFrame\\UI-Achievement-Parchment")
self.frame.category.backdrop:SetTexCoord(0,.5,0,1)
--self.frame.category.backdrop:SetTexture(0,0,0,1)
self.frame.category:SetPoint("RIGHT", self.frame, "LEFT", 12, 0)
 
--Tab Buttons
806,9 → 788,6
self.frame.tabButtons[3] = self:CreateTab("$parentTab1", self.frame, UAGuild, "guild")
self.frame.tabButtons[3]:SetPoint("TOPLEFT", self.frame.tabButtons[2], "TOPRIGHT", 5, 0)
 
--self.frame.tabButtons[3] = self:CreateTab("$parentTab1", self.frame, "Search", "search")
--self.frame.tabButtons[3]:SetPoint("TOPLEFT", self.frame.tabButtons[2], "TOPRIGHT", 5, 0)
 
--Category Buttons
self.frame.catButtons[1] = self:CreateCategoryButton("$parentCatButton1", self.frame.category)
self.frame.catButtons[1]:SetPoint("TOPLEFT", self.frame.category, 17, -17)
836,7 → 815,6
self.frame.achButtons[1]:SetScript("OnLeave", function(self)
GameTooltip:Hide();
guildMemberRequestFrame = nil;
charOwnerRequestFrame = nil;
end)
for i=2, 27 do
self.frame.achButtons[i] = self:CreateAchievementButton("$parentAchButton" .. i, self.frame)
857,7 → 835,6
self.frame.achButtons[i]:SetScript("OnLeave", function(self)
GameTooltip:Hide();
guildMemberRequestFrame = nil;
charOwnerRequestFrame = nil;
end)
end
 
901,9 → 878,41
self.frame.editbox:SetPoint("TOPLEFT", self.frame.catToggle, "TOPRIGHT", 10, 0)
 
--Achievements Earned Progress Bar
self.frame.summaryBar = CreateFrame("StatusBar", "$parentBar", self.frame, "AchievementProgressBarTemplate")
self.frame.summaryBar:SetPoint("LEFT", self.frame.editbox, "RIGHT", 15, 9)
self.frame.summaryBar:SetWidth(330)
 
self.frame.summaryBar = CreateFrame("StatusBar", "$parentBar", self.frame, "AchievementFrameSummaryCategoryTemplate")
self.frame.summaryBar:SetPoint("LEFT", self.frame.editbox, "RIGHT", 10, -5)
self.frame.summaryBar:SetScript("OnShow", function(self)
if self:GetID() ~= nil then
local totalAchievements, totalCompleted
local titleCategory = GetCategoryInfo(self:GetID())
if UrbanAchiever.isComparing or self:GetID() == -1 then
if self:GetID() ~= -1 then
totalAchievements, totalCompleted = GetCategoryNumAchievements(self:GetID());
else
local inGuild
if UrbanAchiever.currentTab == "guild" then
inGuild = true
else
inGuild = false
end
titleCategory = UAAchievEarned
totalAchievements, totalCompleted = GetNumCompletedAchievements(inGuild);
end
else
totalAchievements, totalCompleted = AchievementFrame_GetCategoryTotalNumAchievements(self:GetID(), true);
end
self.text:SetText(string.format("%d/%d", totalCompleted, totalAchievements));
self:SetMinMaxValues(0, totalAchievements);
self:SetValue(totalCompleted);
self:RegisterEvent("ACHIEVEMENT_EARNED");
self.name:SetText(titleCategory)
end
end)
self.frame.summaryBar:SetScript("OnHide", function(self)
AchievementFrameSummaryCategory_OnHide(self)
end)
self.frame.summaryBar:SetWidth(200)
self.frame.summaryBar:SetHeight(21)
self.frame.summaryBar.text:ClearAllPoints()
self.frame.summaryBar.text:SetPoint("RIGHT", -5, 0)
self.frame.summaryBar.text:SetJustifyH("RIGHT")
912,32 → 921,57
self.frame.summaryBar.name:SetJustifyH("LEFT")
self.frame.summaryBar.name:SetWidth(300)
 
--creatEachCategoryProgessBar
--Create Each Category Progress Bar
local lastFrame
local idxCat = 0
for i,id in ipairs(GetCategoryList()) do
tittleCat, parentCatID = GetCategoryInfo(id)
local tittleCat, parentCatID = GetCategoryInfo(id)
if ( parentCatID == -1 )then
idxCat, lastFrame = self:createCategoryStatusBar(id, idxCat, lastFrame)
idxCat, lastFrame = self:createCategoryStatusBar(id, idxCat, lastFrame, tittleCat)
end
end
 
local lastFrame
local idxCat = 0
for i,id in ipairs(GetGuildCategoryList()) do
tittleCat, parentCatID = GetCategoryInfo(id)
local tittleCat, parentCatID = GetCategoryInfo(id)
if ( parentCatID == -1 or parentCatID == 15076 )then
idxCat, lastFrame = self:createCategoryStatusBar(id, idxCat, lastFrame)
idxCat, lastFrame = self:createCategoryStatusBar(id, idxCat, lastFrame, tittleCat)
end
end
 
 
--Achievements Earned Comparison Progress Bar
self.frame.comparisonSummaryBar = CreateFrame("StatusBar", "$parentComparisonBar", self.frame, "AchievementProgressBarTemplate")
self.frame.comparisonSummaryBar:SetPoint("LEFT", self.frame.editbox, "RIGHT", 15, -8)
self.frame.comparisonSummaryBar:SetWidth(330)
--self.frame.comparisonSummaryBar.text:SetFontObject("GameFontNormal")
--self.frame.comparisonSummaryBar.text:SetWidth(320)
self.frame.comparisonSummaryBar = CreateFrame("StatusBar", "$parentComparisonBar", self.frame, "AchievementFrameSummaryCategoryTemplate")
self.frame.comparisonSummaryBar:SetPoint("LEFT", self.frame.summaryBar, "RIGHT", 10, 0)
self.frame.comparisonSummaryBar:SetScript("OnShow", function(self)
if self:GetID() ~= nil then
if UrbanAchiever.isComparing then
local totalAchievements, totalCompleted
if self:GetID() ~= -1 then
totalAchievements = GetCategoryNumAchievements(self:GetID());
totalCompleted = GetComparisonCategoryNumAchievements(self:GetID())
else
local inGuild
if UrbanAchiever.currentTab == "guild" then
inGuild = true
else
inGuild = false
end
totalAchievements, totalCompleted = GetNumComparisonCompletedAchievements(inGuild)
end
self.text:SetText(string.format("%d/%d", totalCompleted, totalAchievements));
self:SetMinMaxValues(0, totalAchievements);
self:SetValue(totalCompleted);
self:RegisterEvent("ACHIEVEMENT_EARNED");
end
end
end)
self.frame.comparisonSummaryBar:SetScript("OnHide", function(self)
AchievementFrameSummaryCategory_OnHide(self)
end)
self.frame.comparisonSummaryBar:SetWidth(200)
self.frame.comparisonSummaryBar:SetHeight(21)
self.frame.comparisonSummaryBar.text:ClearAllPoints()
self.frame.comparisonSummaryBar.text:SetPoint("RIGHT", -5, 0)
self.frame.comparisonSummaryBar.text:SetJustifyH("RIGHT")
945,6 → 979,7
self.frame.comparisonSummaryBar.name:SetPoint("LEFT", 5, 0)
self.frame.comparisonSummaryBar.name:SetJustifyH("LEFT")
self.frame.comparisonSummaryBar.name:SetWidth(300)
self.frame.comparisonSummaryBar:Hide()
 
--Category Scroll Bar
self.frame.catScroll = CreateFrame("Slider", "$parentCatSlider", self.frame.category, "UIPanelScrollBarTemplate")
1074,7 → 1109,6
self.frame.display.criteriaButtons[1]:SetScript("OnLeave", function(self)
GameTooltip:Hide();
guildMemberRequestFrame = nil;
charOwnerRequestFrame = nil;
end)
for i=2, 9 do
self.frame.display.criteriaButtons[i] = self:CreateCriteriaButton("$parentCriteriaButton" .. i, self.frame.display)
1091,7 → 1125,6
self.frame.display.criteriaButtons[i]:SetScript("OnLeave", function(self)
GameTooltip:Hide();
guildMemberRequestFrame = nil;
charOwnerRequestFrame = nil;
end)
end
 
1130,7 → 1163,7
self.frame:Hide()
end
 
function self:createCategoryStatusBar(id, idxCat, lastFrame)
function self:createCategoryStatusBar(id, idxCat, lastFrame, tittleCat)
idxCat = idxCat + 1
local categoryFrame = CreateFrame("StatusBar","categoryStatusBar"..id, self.frame, "AchievementFrameSummaryCategoryTemplate")
if idxCat == 1 then
1341,18 → 1374,14
button.bgframe:SetPoint("TOPLEFT")
 
button.background = button:CreateTexture("$parentBackground", "BACKGROUND")
--button.background:SetTexture("Interface\\AchievementFrame\\UI-Achievement-Parchment-Horizontal")
button.background:SetTexture("Interface\\AchievementFrame\\UI-Achievement-Stat-Buttons")
button.background:SetAlpha(0.5)
 
button.background:SetPoint("TOPLEFT", button.offset, "TOPRIGHT")
button.background:SetPoint("BOTTOMRIGHT", button.bgframe)
--button.background:SetWidth(290)
--button.background:SetHeight(16)
 
button.name = button:CreateFontString("$parentNameText","BORDER", "GameFontNormal")
button.name:SetPoint("TOPLEFT", button.background)
--button.text:SetPoint("TOPRIGHT", button, "TOPRIGHT")
button.name:SetWidth(200)
button.name:SetHeight(16)
button.name:SetJustifyH("LEFT")
1361,7 → 1390,6
 
button.points = button:CreateFontString("$parentPointsText","BORDER", "GameFontNormal")
button.points:SetPoint("TOPLEFT", button, "TOPLEFT", 217, 0)
--button.text:SetPoint("TOPRIGHT", button, "TOPRIGHT")
button.points:SetWidth(20)
button.points:SetJustifyH("LEFT")
button.points:SetJustifyV("TOP")
1369,7 → 1397,6
 
button.completed = button:CreateFontString("$parentCompletedText","BORDER", "GameFontNormal")
button.completed:SetPoint("TOPLEFT", button.points, "TOPRIGHT", 2, 0)
--button.text:SetPoint("TOPRIGHT", button, "TOPRIGHT")
button.completed:SetWidth(60)
button.completed:SetHeight(16)
button.completed:SetJustifyH("LEFT")
1379,7 → 1406,6
button.stat = button:CreateFontString("$parentStatText","BORDER", "GameFontNormal")
button.stat:SetPoint("TOPLEFT", button, "TOPLEFT", 217, 0)
button.stat:SetPoint("TOPRIGHT", button.background, "TOPRIGHT")
--button.stat:SetWidth(20)
button.stat:SetJustifyH("LEFT")
button.stat:SetJustifyV("TOP")
button.stat:SetTextColor(1,1,1)
1393,7 → 1419,6
 
button.comparison.background = button.comparison:CreateTexture("$parentBackground", "BACKGROUND")
button.comparison.background:SetTexture("Interface\\AchievementFrame\\UI-Achievement-Parchment-Horizontal")
--button.comparison.background:SetTexture("Interface\\AchievementFrame\\UI-Achievement-Stat-Buttons")
button.comparison.background:SetAlpha(0.5)
button.comparison.background:SetAllPoints(button.comparison)
 
1487,12 → 1512,9
button.comparison:SetHeight(16)
button.comparison:SetPoint("LEFT", button.offset)
 
--button:SetNormalTexture("Interface/FriendsFrame/UI-FriendsFrame-HighlightBar")
 
local highlightTexture = button:CreateTexture()
highlightTexture:SetTexture("Interface\\AchievementFrame\\UI-Achievement-Stat-Buttons")
highlightTexture:SetTexCoord(0, 1, 0.56, 0.73)
--highlightTexture:SetAllPoints(button)
 
button:SetHighlightTexture("Interface\\FriendsFrame\\UI-FriendsFrame-HighlightBar", "ADD")
 
1530,11 → 1552,9
button:SetHeight(30)
button:SetWidth(100)
 
--button:SetNormalTexture("Interface\\DialogFrame\\UI-DialogBox-Header")
button:SetHighlightTexture("Interface\\PaperDollInfoFrame\\UI-Character-Tab-Highlight", "ADD")
 
button:SetBackdrop({
--bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", tile = true, edgeSize = 16,
insets = {left = -5, right = -5, top = -5, bottom = -5}
})
1572,10 → 1592,6
editboxFrame:SetScript("OnEscapePressed", function() editboxFrame:ClearFocus() end)
editboxFrame:SetScript("OnEditFocusLost", function() editboxFrame:HighlightText(0, 0) end)
editboxFrame:SetScript("OnEditFocusGained", function() editboxFrame:HighlightText() end)
--editboxFrame:SetScript("OnTextChanged", Editbox_OnTextChanged)
--editboxFrame:SetScript("OnEnter", Editbox_OnEnter)
--editboxFrame:SetScript("OnLeave", Editbox_OnLeave)
--editboxFrame:SetScript("OnTextChanged", function() self:Search(editboxFrame:GetText()) end)
editboxFrame:SetScript("OnEnterPressed", function() self:Search(editboxFrame:GetText()) editboxFrame:ClearFocus() end)
 
-- Left border.
1639,13 → 1655,6
self:RefreshCategoryButtons()
self:RefreshAchievementButtons(false)
self:ComparisonUpdate()
--self:TrackerUpdate()
if self.currentTab == "guild" then
inGuild = true;
else
inGuild = false;
end
self.pointsText:SetText(GetTotalAchievementPoints(inGuild));
end
 
function self:PopulateMasterList()
1721,7 → 1730,7
 
--Add child Categories
for _,childId in next, list do
childName, childParent = GetCategoryInfo(childId)
local childName, childParent = GetCategoryInfo(childId)
for parentKey, parentCat in next, self.categories[tab] do
if childParent == parentCat.id then
tinsert(parentCat.children,{
1789,8 → 1798,6
 
if completed == "" then
self.frame.achButtons[button].background:SetTexture("Interface\\AchievementFrame\\UI-Achievement-Parchment-Horizontal-Desaturated")
--else
-- self.frame.achButtons[button].background:SetTexture("Interface\\AchievementFrame\\UI-Achievement-Parchment-Horizontal")
end
 
if IsTrackedAchievement(id) then
1923,9 → 1930,8
 
 
if self.currentTab == "guild" then
requiresRep, hasRep, repLevel = GetAchievementGuildRep(self.currentAch);
local requiresRep, hasRep, repLevel = GetAchievementGuildRep(self.currentAch);
if ( requiresRep ) then
initialOffset = -ACHIEVEMENTBUTTON_CRITERIAROWHEIGHT;
local gender = UnitSex("player");
local factionStandingtext = GetText("FACTION_STANDING_LABEL"..repLevel, gender);
self.frame.display.repCriteria:SetFormattedText(ACHIEVEMENT_REQUIRES_GUILD_REPUTATION, factionStandingtext);
1971,7 → 1977,7
if self.frame == nil then self:Initialize("","") end
if self.frame == nil then return end
if not self.frame:IsShown() then return end
local criteriaName, criteriaType, criteriaCompleted, criteriaQuantity, criteriaReqQuantity,_ ,criteriaFlags, criteriaAssetID, icon, quantityStr
local id, month, day, year, criteriaName, criteriaType, criteriaCompleted, criteriaQuantity, criteriaReqQuantity, _ ,criteriaFlags, criteriaAssetID, icon, quantityStr, charName
local buttonNum = 1
local str = ""
local offset = 1
2007,21 → 2013,7
if UASVPC.specificCriteria and criteriaReqQuantity > 1 then
str = string.format("%s (%d/%d)", str, criteriaQuantity, criteriaReqQuantity)
end
--GetCriteriaComparisonInfo was remove a long time ago
--[[if self.isComparing and not compDone and UASVPC.statCriteria then
compCriteriaText,comparisonComplete = GetCriteriaComparisonInfo(self.currentAch, a, 1)
 
self.frame.display.criteriaButtons[buttonNum].comparison:Show()
 
offset = offset + 16
 
if comparisonComplete then
self.frame.display.criteriaButtons[buttonNum].comparison:SetTexture("Interface\\RaidFrame\\ReadyCheck-Ready")
else
self.frame.display.criteriaButtons[buttonNum].comparison:SetTexture("Interface\\RaidFrame\\ReadyCheck-NotReady")
end
end]]
 
if criteriaType == CRITERIA_TYPE_ACHIEVEMENT and criteriaAssetID then
--Its a meta achievement
self.frame.display.criteriaButtons[buttonNum].icon:SetTexture(icon)
2139,22 → 2131,11
if self.currentTab == "guild" then
self.pointsText:SetTextColor(0,1,0);
self.pointsText:SetText(GetTotalAchievementPoints(true));
total, completed = GetNumCompletedAchievements(true);
if self.currentCat == -1 then
self.frame.summaryBar:SetMinMaxValues(0, total)
self.frame.summaryBar:SetValue(completed)
self.frame.summaryBar.text:SetText(completed .. "/" .. total)
end
else
self.pointsText:SetTextColor(1,1,1);
self.pointsText:SetText(GetTotalAchievementPoints());
total, completed = GetNumCompletedAchievements();
if self.currentCat == -1 then
self.frame.summaryBar:SetMinMaxValues(0, total)
self.frame.summaryBar:SetValue(completed)
self.frame.summaryBar.text:SetText(completed .. "/" .. total)
end
end
self:RefreshSummaryBar()
 
--Stuff for tab highlights
--Not happy with this, but it works till I find some better textures.
2338,41 → 2319,19
end
 
function self:RefreshSummaryBar()
local total, completed
local name
local compareCat = self.currentCat
if self.currentCat < 0 then
total, completed = GetNumCompletedAchievements()
name = UATotal
compareCat = -1
else
total, completed = GetCategoryNumAchievements(self.currentCat)
name = GetCategoryInfo(self.currentCat)
end
self.frame.summaryBar:Hide()
self.frame.summaryBar:SetID(self.currentCat)
self.frame.summaryBar:Show()
 
self.frame.comparisonSummaryBar:Hide()
 
if completed == 0 then
self.frame.summaryBar:Hide()
if self.isComparing then
self.frame.summaryBar:SetWidth(200)
self.frame.comparisonSummaryBar:Hide()
self.frame.comparisonSummaryBar.name:SetText('('..self.comparisonUnitName..')')
self.frame.comparisonSummaryBar:SetID(self.currentCat)
self.frame.comparisonSummaryBar:Show()
else
self.frame.summaryBar:Show()
self.frame.summaryBar:SetMinMaxValues(0, total)
self.frame.summaryBar:SetValue(completed)
self.frame.summaryBar.text:SetText(completed .. "/" .. total)
if GetLocale() == 'deDE' then--It's crapy I know, I have to done something for this, I haven't the time now.
self.frame.summaryBar.name:SetText(UAAchievEarned .. " " .. name)
else
self.frame.summaryBar.name:SetText(name .. " " .. UAAchievEarned)
end
 
if self.isComparing then
local comparisonCompleted = GetComparisonCategoryNumAchievements(compareCat)
self.frame.comparisonSummaryBar:Show()
self.frame.comparisonSummaryBar:SetMinMaxValues(0, total)
self.frame.comparisonSummaryBar:SetValue(comparisonCompleted)
self.frame.comparisonSummaryBar.text:SetText(comparisonCompleted .. "/" .. total)
self.frame.comparisonSummaryBar.name:SetText(self.comparisonUnitName)
end
self.frame.summaryBar:SetWidth(330)
self.frame.comparisonSummaryBar:Hide()
end
end
-------------------------------------------------------------
2404,4 → 2363,4
 
ClearAchievementComparisonUnit()
SetAchievementComparisonUnit(unit)
end
end
\ No newline at end of file