/trunk
--Change this if you dont want the statistic criteria shown. |
local DISPLAY_STATISTIC_CRITERIA = true |
--Dont change anything else :D |
UrbanAchiever = LibStub("AceAddon-3.0"):NewAddon("UrbanAchiever", "AceConsole-3.0", "AceEvent-3.0", "AceHook-3.0") |
local self = UrbanAchiever |
------------------------------------------------------------- |
["tracker"] = { |
["x"] = UIParent:GetWidth()/2, |
["y"] = UIParent:GetHeight()/2, |
} |
}, |
["statCriteria"] = true, |
} |
------------------------------------------------------------- |
--Startup Stuff |
if self.isComparing then |
--self.frame.display.criteriaButtons[2]:Show() |
self.frame.display.compareDate:Show() |
self.frame.display.compareDate:SetText("|cffffffff" .. GetComparisonStatistic(id)) |
self.frame.display.compareDate:SetText("|cffffffff" .. self.comparisonUnitName .. ": " .. GetComparisonStatistic(id)) |
self.frame.display.reward:SetText("|cffffffff" .. UnitName("player") .. ": " .. GetStatistic(id)) |
end |
if DISPLAY_STATISTIC_CRITERIA then |
if UASVPC.statCriteria then |
self:RefreshCriteriaButtons() |
else |
for i=1, #self.frame.display.criteriaButtons do |
self.frame.display.criteriaButtons[i]:Hide() |
self.frame.criteriaScroll:Hide() |
end |
end |
else |
end |
end) |
frame.icon = CreateFrame("Button", "$parentIcon", frame) |
frame.icon = frame:CreateTexture("$parentIcon", "ARTWORK") |
frame.icon:SetWidth(16) |
frame.icon:SetHeight(16) |
frame.icon:SetPoint("TOPLEFT") |
frame.icon:SetScript("OnClick", function() |
frame.name = frame:CreateFontString("$parentName", "BORDER", "GameFontNormal") |
frame.name:SetTextColor(1,1,1) |
frame.name:SetPoint("TOPLEFT", frame.icon, "TOPRIGHT") |
frame.name:SetPoint("TOPRIGHT") |
frame.name:SetJustifyH("LEFT") |
local click = CreateFrame("Button", nil, frame) |
click:SetHighlightTexture("Interface\\FriendsFrame\\UI-FriendsFrame-HighlightBar", "ADD") |
click:SetPoint("TOPLEFT", frame.icon) |
click:SetPoint("BOTTOMRIGHT", frame.name) |
click:SetScript("OnClick", function() |
if arg1 == "LeftButton" then |
if IsAltKeyDown() then |
self:SubTracker(frame:GetID()) |
end |
end) |
frame.name = frame:CreateFontString("$parentName", "BORDER", "GameFontNormal") |
frame.name:SetTextColor(1,1,1) |
frame.name:SetPoint("TOPLEFT", frame.icon, "TOPRIGHT") |
frame.name:SetPoint("TOPRIGHT") |
frame.name:SetJustifyH("LEFT") |
frame.criteria = frame:CreateFontString("$parentCriteria", "BORDER", "GameFontNormal") |
frame.criteria:SetTextColor(0.5,0.5,0.5) |
frame.criteria:SetPoint("TOPLEFT", frame.icon, "BOTTOMLEFT", 1,0) |
if completed then |
name = "|Cff00ff00" .. name |
end |
self.tracker.achievements[num].icon:SetNormalTexture(icon) |
self.tracker.achievements[num].icon:SetTexture(icon) |
self.tracker.achievements[num].name:SetText(name) |
self.tracker.achievements[num].bar:Hide() |
--Alliance = 1 |
--Horde = 2 |
UrbanAchiever.factionAchs = { |
["1012"] = 1, |
["1022"] = 1, |
["1023"] = 1, |
["1024"] = 1, |
["1028"] = 1, |
["1029"] = 1, |
["1030"] = 1, |
["1034"] = 1, |
["1035"] = 1, |
["1038"] = 1, |
["1040"] = 1, |
["1151"] = 1, |
["1167"] = 1, |
["1169"] = 1, |
["1172"] = 1, |
["1184"] = 1, |
["1189"] = 1, |
["1191"] = 1, |
["1192"] = 1, |
["1255"] = 1, |
["1262"] = 1, |
["1279"] = 1, |
["1563"] = 1, |
["1656"] = 1, |
["1676"] = 1, |
["1678"] = 1, |
["1681"] = 1, |
["1684"] = 1, |
["1686"] = 1, |
["1692"] = 1, |
["1697"] = 1, |
["1707"] = 1, |
["1757"] = 1, |
["1762"] = 1, |
["1782"] = 1, |
["2016"] = 1, |
["33"] = 1, |
["34"] = 1, |
["35"] = 1, |
["37"] = 1, |
["41"] = 1, |
["202"] = 1, |
["203"] = 1, |
["206"] = 1, |
["2144"] = 1, |
["2194"] = 1, |
["220"] = 1, |
["225"] = 1, |
["230"] = 1, |
["246"] = 1, |
["33"] = 1, |
["34"] = 1, |
["35"] = 1, |
["37"] = 1, |
["388"] = 1, |
["41"] = 1, |
["433"] = 1, |
["434"] = 1, |
["435"] = 1, |
["963"] = 1, |
["966"] = 1, |
["969"] = 1, |
["970"] = 1, |
["1005"] = 2, |
["1006"] = 2, |
["1011"] = 2, |
["1025"] = 2, |
["1026"] = 2, |
["1027"] = 2, |
["1031"] = 2, |
["1032"] = 2, |
["1033"] = 2, |
["1036"] = 2, |
["1037"] = 2, |
["1039"] = 2, |
["1041"] = 2, |
["1164"] = 2, |
["1168"] = 2, |
["1170"] = 2, |
["1173"] = 2, |
["1175"] = 2, |
["1203"] = 2, |
["1251"] = 2, |
["1252"] = 2, |
["1271"] = 2, |
["1272"] = 2, |
["1273"] = 2, |
["1274"] = 2, |
["1280"] = 2, |
["1356"] = 2, |
["1357"] = 2, |
["1358"] = 2, |
["1359"] = 2, |
["1360"] = 2, |
["1502"] = 2, |
["1657"] = 2, |
["1677"] = 2, |
["1680"] = 2, |
["1682"] = 2, |
["1683"] = 2, |
["1685"] = 2, |
["1691"] = 2, |
["1693"] = 2, |
["1698"] = 2, |
["1783"] = 2, |
["1784"] = 2, |
["2017"] = 2, |
["2145"] = 2, |
["2192"] = 2, |
["2195"] = 2, |
["970"] = 1, |
["1012"] = 1, |
["1022"] = 1, |
["1023"] = 1, |
["1024"] = 1, |
["1028"] = 1, |
["1029"] = 1, |
["1030"] = 1, |
["1034"] = 1, |
["1035"] = 1, |
["1038"] = 1, |
["1040"] = 1, |
["1151"] = 1, |
["1167"] = 1, |
["1169"] = 1, |
["1172"] = 1, |
["1184"] = 1, |
["1189"] = 1, |
["1191"] = 1, |
["1192"] = 1, |
["1255"] = 1, |
["1262"] = 1, |
["1279"] = 1, |
["1563"] = 1, |
["1656"] = 1, |
["1676"] = 1, |
["1678"] = 1, |
["1681"] = 1, |
["1684"] = 1, |
["1686"] = 1, |
["1692"] = 1, |
["1697"] = 1, |
["1707"] = 1, |
["1757"] = 1, |
["1762"] = 1, |
["1782"] = 1, |
["2016"] = 1, |
["2144"] = 1, |
["2194"] = 1, |
["224"] = 2, |
["259"] = 2, |
["443"] = 2, |
["967"] = 2, |
["968"] = 2, |
["971"] = 2, |
["1005"] = 2, |
["1006"] = 2, |
["1011"] = 2, |
["1025"] = 2, |
["1026"] = 2, |
["1027"] = 2, |
["1031"] = 2, |
["1032"] = 2, |
["1033"] = 2, |
["1036"] = 2, |
["1037"] = 2, |
["1039"] = 2, |
["1041"] = 2, |
["1164"] = 2, |
["1168"] = 2, |
["1170"] = 2, |
["1173"] = 2, |
["1175"] = 2, |
["1203"] = 2, |
["1251"] = 2, |
["1252"] = 2, |
["1271"] = 2, |
["1272"] = 2, |
["1273"] = 2, |
["1274"] = 2, |
["1280"] = 2, |
["1356"] = 2, |
["1357"] = 2, |
["1358"] = 2, |
["1359"] = 2, |
["1360"] = 2, |
["1502"] = 2, |
["1657"] = 2, |
["1677"] = 2, |
["1680"] = 2, |
["1682"] = 2, |
["1683"] = 2, |
["1685"] = 2, |
["1691"] = 2, |
["1693"] = 2, |
["1698"] = 2, |
["1783"] = 2, |
["1784"] = 2, |
["2017"] = 2, |
["2145"] = 2, |
["2192"] = 2, |
["2195"] = 2, |
["2200"] = 2, |
} |
end) |
local move = CreateFrame("Button", nil, panel, "UIPanelButtonTemplate") |
move:SetPoint("TOPLEFT", reset, "TOPRIGHT", 5, 0) |
move:SetPoint("TOPLEFT", sC, "TOPRIGHT", 5, 0) |
move:SetWidth(120) |
move:SetHeight(24) |
move.text = move:GetRegions() |
UrbanAchiever.tracker.header:Show() |
end) |
local statTitle = panel:CreateFontString(nil, "ARTWORK", "GameFontNormal") |
statTitle:SetText("Options") |
statTitle:SetPoint("TOPLEFT", reset, "BOTTOMLEFT", 0, -10) |
local sC = CreateFrame("CheckButton", "UACB", panel, "OptionsCheckButtonTemplate") |
sC:SetPoint("TOPLEFT", statTitle, "BOTTOMLEFT", 0, -10) |
sC.text = getglobal(sC:GetName() .. "Text") |
sC.text:SetText("Display Statistic Criteria") |
sC.tooltipText = "It's ultimately useless, but can sometimes show you what you've used from a list." |
sC:SetChecked(UASVPC.statCriteria) |
sC:SetScript("OnClick", function() |
if sC:GetChecked() then |
PlaySound("igMainMenuOptionCheckBoxOn") |
else |
PlaySound("igMainMenuOptionCheckBoxOff") |
end |
UASVPC.statCriteria = not UASVPC.statCriteria |
sC:SetChecked(UASVPC.statCriteria) |
end) |
InterfaceOptions_AddCategory(panel) |
end |