WoWInterface SVN UrbanAchiever

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 16 to Rev 15
    Reverse comparison

Rev 16 → Rev 15

trunk/Embeds.xml
9,5 → 9,4
<Include file="Libs\AceConsole-3.0\AceConsole-3.0.xml"/>
<Include file="Libs\AceDB-3.0\AceDB-3.0.xml"/>
<Include file="Libs\AceEvent-3.0\AceEvent-3.0.xml"/>
<Include file="Libs\AceHook-3.0\AceHook-3.0.xml"/>
</Ui>
\ No newline at end of file
trunk/Main.lua
1,4 → 1,4
UrbanAchiever = LibStub("AceAddon-3.0"):NewAddon("UrbanAchiever", "AceConsole-3.0", "AceEvent-3.0", "AceHook-3.0")
UrbanAchiever = LibStub("AceAddon-3.0"):NewAddon("UrbanAchiever", "AceConsole-3.0", "AceEvent-3.0")
local self = UrbanAchiever
-------------------------------------------------------------
--Locals
8,7 → 8,6
BINDING_NAME_URBANACHIEVER_TOGGLE = "Toggle Achievement Frame"
 
local MAX_ACHIEVEMENTS = 2500
local menuTypes= {"PLAYER", "PARTY", "RAID_PLAYER"}
 
self.categories = {
["achievements"] = {},
191,55 → 190,16
self:RegisterEvent("INSPECT_ACHIEVEMENT_READY", function()
self:ComparisonUpdate()
self:RefreshAchievementButtons(false)
self.frame:Show()
end)
 
--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.
for j = 1, #menuTypes do
local t = menuTypes[j]
for i = 1, #UnitPopupMenus[t] do
if UnitPopupMenus[t][i] == "ACHIEVEMENTS" then
UnitPopupMenus[t][i] = "UA_ACHIEVEMENTS"
break
end
end
end
 
self:SecureHook("UnitPopup_ShowMenu")
end
 
function self:OnDisable()
self:UnregisterEvent("ADDON_LOADED")
self:UnregisterEvent("ACHIEVEMENT_EARNED")
self:UnregisterEvent("CRITERIA_UPDATE")
 
--Go back to the original button.
for j = 1, #menuTypes do
local t = menuTypes[j]
for i = 1, #UnitPopupMenus[t] do
if UnitPopupMenus[t][i] == "UA_ACHIEVEMENTS" then
UnitPopupMenus[t][i] = "ACHIEVEMENTS"
break
end
end
end
end
 
-------------------------------------------------------------
--Hooking Stuff
-------------------------------------------------------------
function self:UnitPopup_ShowMenu(dropdownMenu, which, unit, name, userData, ...)
for i=1, UIDROPDOWNMENU_MAXBUTTONS do
button = _G["DropDownList"..UIDROPDOWNMENU_MENU_LEVEL.."Button"..i];
if button.value == "UA_ACHIEVEMENTS" then
button.func = function()
self:SetComparisonUnit(unit)
end
end
end
end
-------------------------------------------------------------
--Utilities
-------------------------------------------------------------
function self:InsertIntoChat(id)
458,7 → 418,6
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")
469,7 → 428,6
compSetButton:SetScript("OnClick", function()
self:SetComparisonUnit("target")
end)
]]--
 
--Category Frame
self.frame.category = CreateFrame("Frame", "$parentCategoryFrame", self.frame)
trunk Property changes : Modified: svn:ignore - metacode.txt FactionSpecificAchievements.lua + metacode.txt