Quantcast

4.9.98

Steven Jackson [10-12-14 - 20:44]
4.9.98
Filename
Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua
Interface/AddOns/SVUI/packages/bag/SVBag.lua
Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua
Interface/AddOns/SVUI/packages/stats/stats/reputation.lua
Interface/AddOns/SVUI/scripts/mounts.lua
Interface/AddOns/SVUI/setup/configs.lua
Interface/AddOns/SVUI/system/alerts.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petjournal.lua
diff --git a/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua b/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua
index 6664319..1dc362e 100644
--- a/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua
+++ b/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua
@@ -942,12 +942,14 @@ local Core_NewPackage = function(self, schema, header)
     return self[schema]
 end

-local Core_ResetData = function(self, sub, sub2)
+local Core_ResetData = function(self, sub, sub2, sub3)
     local data = self.db
     local sv = rawget(data, "data")
     local src = rawget(data, "defaults")
     local targetData
-    if(sub2 and sv and sv[sub]) then
+    if(sub3 and sub2 and sv and sv[sub] and sv[sub][sub2]) then
+        targetData = sv[sub][sub2][sub3]
+    elseif(sub2 and sv and sv[sub]) then
         targetData = sv[sub][sub2]
     elseif(sub and sv) then
         targetData = sv[sub]
diff --git a/Interface/AddOns/SVUI/packages/bag/SVBag.lua b/Interface/AddOns/SVUI/packages/bag/SVBag.lua
index 4a71d77..c77d095 100644
--- a/Interface/AddOns/SVUI/packages/bag/SVBag.lua
+++ b/Interface/AddOns/SVUI/packages/bag/SVBag.lua
@@ -33,7 +33,7 @@ local table 	= _G.table;
 local find, format, len = string.find, string.format, string.len;
 local sub, byte = string.sub, string.byte;
 --[[ MATH METHODS ]]--
-local floor, ceil = math.floor, math.ceil;
+local floor, ceil, abs = math.floor, math.ceil, math.abs;
 local twipe = table.wipe;
 --[[
 ##########################################################
@@ -80,6 +80,17 @@ local BagFilters = CreateFrame("Frame", "SVUI_BagFilterMenu", UIParent);
 LOCAL FUNCTIONS
 ##########################################################
 ]]--
+local goldFormat = "%s|TInterface\\MONEYFRAME\\UI-GoldIcon.blp:16:16|t"
+
+local function FormatCurrency(amount)
+	if not amount then return end
+	local gold = floor(abs(amount/10000))
+	if gold ~= 0 then
+		gold = BreakUpLargeNumbers(gold)
+		return goldFormat:format(gold)
+	end
+end
+
 local function StyleBagToolButton(button)
 	if button.styled then return end

@@ -614,10 +625,12 @@ local ContainerFrame_UpdateLayout = function(self)
 				BankFrameItemButton_Update(menu[i])
 				BankFrameItemButton_UpdateLocked(menu[i])
 			end
-			for i = 1, MAX_CONTAINER_ITEMS do
-				if(bag[i]) then
-					bag[i]:Hide();
-				end
+			if(self.Bags[bagID]) then
+				for i = 1, MAX_CONTAINER_ITEMS do
+					if(self.Bags[bagID][i]) then
+						self.Bags[bagID][i]:Hide();
+					end
+				end
 			end
 		end
 	end
@@ -647,83 +660,78 @@ local ReagentFrame_UpdateLayout = function(self)

 	self.holderFrame:Width(holderWidth);

-	if(not IsReagentBankUnlocked()) then
-        local cost = GetReagentBankCost()
-        print(cost)
-    else
-		local bag;
-		local bagName = ("%sBag%d"):format(containerName, bagID)
-
-		if not self.Bags[bagID] then
-			bag = CreateFrame("Frame", bagName, self);
-			bag:SetID(bagID);
-			bag.numSlots = maxCount;
-			bag.SlotUpdate = SlotUpdate;
-			bag.RefreshSlots = RefreshReagentSlots;
-			self.Bags[bagID] = bag
-		else
-			bag = self.Bags[bagID]
-		end
+	local bag;
+	local bagName = ("%sBag%d"):format(containerName, bagID)

-		bag.bagFamily = false;
+	if not self.Bags[bagID] then
+		bag = CreateFrame("Frame", bagName, self);
+		bag:SetID(bagID);
+		bag.numSlots = maxCount;
+		bag.SlotUpdate = SlotUpdate;
+		bag.RefreshSlots = RefreshReagentSlots;
+		self.Bags[bagID] = bag
+	else
+		bag = self.Bags[bagID]
+	end

-		for slotID = 1, maxCount do
-			local slot;
-			totalSlots = totalSlots + 1;
+	bag.bagFamily = false;

-			if not bag[slotID] then
-				local slotName = ("%sSlot%d"):format(bagName, slotID)
-				local newTexName = ("%sNewItemTexture"):format(slotName)
-				local iconName = ("%sIconTexture"):format(slotName)
-				local cdName = ("%sCooldown"):format(slotName)
+	for slotID = 1, maxCount do
+		local slot;
+		totalSlots = totalSlots + 1;

-				slot = CreateFrame("CheckButton", slotName, bag, "ReagentBankItemButtonGenericTemplate");
-				slot:SetNormalTexture(nil);
-				slot:SetCheckedTexture(nil);
-				slot:RemoveTextures()
-				slot:SetSlotTemplate(true, 2, 0, 0, true);
-
-				if(_G[newTexName]) then
-					_G[newTexName]:Hide()
-				end
+		if not bag[slotID] then
+			local slotName = ("%sSlot%d"):format(bagName, slotID)
+			local newTexName = ("%sNewItemTexture"):format(slotName)
+			local iconName = ("%sIconTexture"):format(slotName)
+			local cdName = ("%sCooldown"):format(slotName)

-				slot.iconTexture = _G[iconName];
-				slot.iconTexture:FillInner(slot);
-				slot.iconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9);
-				slot.cooldown = _G[cdName];
+			slot = CreateFrame("CheckButton", slotName, bag, "ReagentBankItemButtonGenericTemplate");
+			slot:SetNormalTexture(nil);
+			slot:SetCheckedTexture(nil);
+			slot:RemoveTextures()
+			slot:SetSlotTemplate(true, 2, 0, 0, true);
+
+			if(_G[newTexName]) then
+				_G[newTexName]:Hide()
+			end

-				SV.Timers:AddCooldown(slot.cooldown)
+			slot.iconTexture = _G[iconName];
+			slot.iconTexture:FillInner(slot);
+			slot.iconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9);
+			slot.cooldown = _G[cdName];

-				bag[slotID] = slot
-			else
-				slot = bag[slotID]
-			end
+			SV.Timers:AddCooldown(slot.cooldown)

-			slot:SetID(slotID);
-			slot:Size(buttonSize);
-			bag:SlotUpdate(slotID);
+			bag[slotID] = slot
+		else
+			slot = bag[slotID]
+		end

-			if slot:GetPoint() then
-				slot:ClearAllPoints();
-			end
+		slot:SetID(slotID);
+		slot:Size(buttonSize);
+		bag:SlotUpdate(slotID);

-			if lastButton then
-				if((totalSlots - 1) % numContainerColumns == 0) then
-					slot:Point("TOP", lastRowButton, "BOTTOM", 0, -buttonSpacing);
-					lastRowButton = slot;
-				else
-					slot:Point("LEFT", lastButton, "RIGHT", buttonSpacing, 0);
-				end
-			else
-				slot:Point("TOPLEFT", self.holderFrame, "TOPLEFT");
+		if slot:GetPoint() then
+			slot:ClearAllPoints();
+		end
+
+		if lastButton then
+			if((totalSlots - 1) % numContainerColumns == 0) then
+				slot:Point("TOP", lastRowButton, "BOTTOM", 0, -buttonSpacing);
 				lastRowButton = slot;
-			end
+			else
+				slot:Point("LEFT", lastButton, "RIGHT", buttonSpacing, 0);
+			end
+		else
+			slot:Point("TOPLEFT", self.holderFrame, "TOPLEFT");
+			lastRowButton = slot;
+		end

-			lastButton = slot;
+		lastButton = slot;

-			BankFrameItemButton_Update(slot);
-			BankFrameItemButton_UpdateLocked(slot)
-		end
+		BankFrameItemButton_Update(slot);
+		BankFrameItemButton_UpdateLocked(slot)
 	end

 	self:Size(containerWidth, containerHeight);
@@ -1240,6 +1248,7 @@ do
 		frame.goldText:SetFontTemplate(SV.Media.font.numbers)
 		frame.goldText:Point("BOTTOMRIGHT", frame.holderFrame, "TOPRIGHT", -2, 4)
 		frame.goldText:SetJustifyH("RIGHT")
+
 		frame.editBox = CreateFrame("EditBox", "SVUI_ContainerFrameEditBox", frame)
 		frame.editBox:SetFrameLevel(frame.editBox:GetFrameLevel()+2)
 		frame.editBox:SetEditboxTemplate()
@@ -1511,15 +1520,29 @@ do
 				frame.swapButton:Size(25, 25)
 				frame.swapButton:SetNormalTexture(ICON_BAGS)
 				StyleBagToolButton(frame.swapButton)
-				frame.swapButton.ttText = isReagent and L["View Bank"] or L["View Reagents"]
-				frame.swapButton:SetScript("OnEnter", Tooltip_Show)
+				frame.swapButton.ttText = L["Toggle Reagents Bank"]
+				frame.swapButton:SetScript("OnEnter", function(self)
+					GameTooltip:SetOwner(self:GetParent(),"ANCHOR_TOP",0,4)
+					GameTooltip:ClearLines()
+					if(not IsReagentBankUnlocked()) then
+						GameTooltip:AddDoubleLine("Purchase Reagents Bank", FormatCurrency(GetReagentBankCost()), 0.1,1,0.1, 1,1,1)
+					else
+						GameTooltip:AddLine(self.ttText)
+					end
+					self:GetNormalTexture():SetGradient(unpack(SV.Media.gradient.highlight))
+					GameTooltip:Show()
+				end)
 				frame.swapButton:SetScript("OnLeave", Tooltip_Hide)
 				frame.swapButton:SetScript("OnClick", function()
-					PlaySound("igMainMenuOption");
-					if(_G["SVUI_ReagentContainerFrame"]:IsShown()) then
-						_G["SVUI_ReagentContainerFrame"]:Hide()
+					if(not IsReagentBankUnlocked()) then
+						SV:StaticPopup_Show("CONFIRM_BUY_REAGENTBANK_TAB");
 					else
-						_G["SVUI_ReagentContainerFrame"]:Show()
+						PlaySound("igMainMenuOption");
+						if(_G["SVUI_ReagentContainerFrame"]:IsShown()) then
+							_G["SVUI_ReagentContainerFrame"]:Hide()
+						else
+							_G["SVUI_ReagentContainerFrame"]:Show()
+						end
 					end
 				end)
 			end
@@ -1537,7 +1560,7 @@ do
 			frame.transferButton:SetScript("OnLeave", Tooltip_Hide)
 			frame.transferButton:SetScript("OnClick", DepositReagentBank)

-			frame:SetPoint("TOPLEFT", self.BankFrame, "TOPRIGHT", 2, 0)
+			frame:SetPoint("BOTTOMLEFT", self.BankFrame, "BOTTOMRIGHT", 2, 0)
 			self.ReagentFrame = frame
 		end
 	end
@@ -1640,17 +1663,20 @@ local function _toggleBackpack()
 end

 function MOD:BANKFRAME_OPENED()
-	local hasReagent = (SV.GameVersion >= 60000)
 	if not self.BankFrame then
 		self:MakeBankOrReagent()
-		self:ModifyBags()
 	end
 	self.BankFrame:UpdateLayout()

-	if(hasReagent and not self.ReagentFrame) then
+	if((SV.GameVersion >= 60000) and not self.ReagentFrame) then
 		self:MakeBankOrReagent(true)
 		self.ReagentFrame:UpdateLayout()
 	end
+	if(self.ReagentFrame) then
+		self.ReagentFrame:UpdateLayout()
+	end
+
+	self:ModifyBags()

 	self.BankFrame:Show()
 	self.BankFrame:RefreshBags()
@@ -1672,6 +1698,9 @@ function MOD:PLAYERBANKBAGSLOTS_CHANGED()
 	if(self.BankFrame and self.BankFrame:IsShown()) then
 		self.BankFrame:UpdateLayout()
 	end
+	if(self.ReagentFrame and self.ReagentFrame:IsShown()) then
+		self.ReagentFrame:UpdateLayout()
+	end
 end

 function MOD:PLAYER_ENTERING_WORLD()
@@ -1685,7 +1714,7 @@ BUILD FUNCTION / UPDATE
 ]]--
 function MOD:ReLoad()
 	if not SV.db.SVBag.enable then return end
-	self.BagFrame:UpdateLayout();
+	self:RefreshBagFrames()
 	self:ModifyBags();
 	self:ModifyBagBar();
 end
diff --git a/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua b/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua
index f9bec86..3f726ff 100644
--- a/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua
+++ b/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua
@@ -841,7 +841,7 @@ function MOD:CHAT_MSG_COMBAT_FACTION_CHANGE(event, msg)
 		for factionIndex = 1, GetNumFactions() do
 			local name = GetFactionInfo(factionIndex)
 			if name == faction and name ~= active then
-				-- local inactive = IsFactionInactive(factionIndex) or SetWatchedFactionIndex(factionIndex)
+				SetWatchedFactionIndex(factionIndex)
 				local strMsg = ("Watching Faction: %s"):format(name)
 				SV:AddonMessage(strMsg)
 				break
diff --git a/Interface/AddOns/SVUI/packages/stats/stats/reputation.lua b/Interface/AddOns/SVUI/packages/stats/stats/reputation.lua
index 86a7c8d..229b452 100644
--- a/Interface/AddOns/SVUI/packages/stats/stats/reputation.lua
+++ b/Interface/AddOns/SVUI/packages/stats/stats/reputation.lua
@@ -41,7 +41,7 @@ local MOD = SV.SVStats;
 REPUTATION STATS
 ##########################################################
 ]]--
-local StatEvents = {"PLAYER_ENTERING_WORLD","UPDATE_FACTION"};
+local StatEvents = {"PLAYER_ENTERING_WORLD", "UPDATE_FACTION"};
 local RepMenuList = {};
 local standingName = {
 	[1] = "Hated",
diff --git a/Interface/AddOns/SVUI/scripts/mounts.lua b/Interface/AddOns/SVUI/scripts/mounts.lua
index 7b9d1c2..16259c1 100644
--- a/Interface/AddOns/SVUI/scripts/mounts.lua
+++ b/Interface/AddOns/SVUI/scripts/mounts.lua
@@ -42,7 +42,7 @@ LOCAL VARIABLES
 ]]--
 local ttSummary = "";
 local NewHook = hooksecurefunc;
-local CountMounts, MountInfo, RandomMount, MountUp, UnMount;
+local CountMounts, MountInfo, RandomMount, MountUp, UnMount, CHECKED, UNCHECKED;

 local MountListener = CreateFrame("Frame");
 MountListener.favorites = false
@@ -52,6 +52,8 @@ LOCAL FUNCTIONS
 ##########################################################
 ]]--
 if(select(4, GetBuildInfo()) >= 60000) then
+	CHECKED = true;
+	UNCHECKED = false;
 	function CountMounts()
 		return C_MountJournal.GetNumMounts()
 	end
@@ -71,6 +73,8 @@ if(select(4, GetBuildInfo()) >= 60000) then
 	end
 	UnMount = C_MountJournal.Dismiss
 else
+	CHECKED = 1;
+	UNCHECKED = 0;
 	function CountMounts()
 		return GetNumCompanions("MOUNT")
 	end
@@ -108,36 +112,36 @@ local function UpdateMountCheckboxes(button, index)
 			if(SV.cache.Mounts.types["GROUND"] ~= index) then
 				SV.cache.Mounts.types["GROUND"] = index
 			end
-			bar["GROUND"]:SetChecked(true)
+			bar["GROUND"]:SetChecked(CHECKED)
 		else
-			bar["GROUND"]:SetChecked(false)
+			bar["GROUND"]:SetChecked(UNCHECKED)
 		end

 		if(SV.cache.Mounts.names["FLYING"] == creatureName) then
 			if(SV.cache.Mounts.types["FLYING"] ~= index) then
 				SV.cache.Mounts.types["FLYING"] = index
 			end
-			bar["FLYING"]:SetChecked(true)
+			bar["FLYING"]:SetChecked(CHECKED)
 		else
-			bar["FLYING"]:SetChecked(false)
+			bar["FLYING"]:SetChecked(UNCHECKED)
 		end

 		if(SV.cache.Mounts.names["SWIMMING"] == creatureName) then
 			if(SV.cache.Mounts.types["SWIMMING"] ~= index) then
 				SV.cache.Mounts.types["SWIMMING"] = index
 			end
-			bar["SWIMMING"]:SetChecked(true)
+			bar["SWIMMING"]:SetChecked(CHECKED)
 		else
-			bar["SWIMMING"]:SetChecked(false)
+			bar["SWIMMING"]:SetChecked(UNCHECKED)
 		end

 		if(SV.cache.Mounts.names["SPECIAL"] == creatureName) then
 			if(SV.cache.Mounts.types["SPECIAL"] ~= index) then
 				SV.cache.Mounts.types["SPECIAL"] = index
 			end
-			bar["SPECIAL"]:SetChecked(true)
+			bar["SPECIAL"]:SetChecked(CHECKED)
 		else
-			bar["SPECIAL"]:SetChecked(false)
+			bar["SPECIAL"]:SetChecked(UNCHECKED)
 		end
 	end
 end
@@ -323,7 +327,7 @@ local function SetMountCheckButtons()
 	    buttonBar["GROUND"]:SetPanelColor(0.2, 0.7, 0.1, 0.15)
 	    buttonBar["GROUND"]:GetCheckedTexture():SetVertexColor(0.2, 0.7, 0.1, 1)
 	    buttonBar["GROUND"].key = "GROUND"
-		buttonBar["GROUND"]:SetChecked(false)
+		buttonBar["GROUND"]:SetChecked(UNCHECKED)
 		buttonBar["GROUND"]:SetScript("OnClick", CheckButton_OnClick)
 		buttonBar["GROUND"]:SetScript("OnEnter", CheckButton_OnEnter)
 		buttonBar["GROUND"]:SetScript("OnLeave", CheckButton_OnLeave)
@@ -336,7 +340,7 @@ local function SetMountCheckButtons()
 	    buttonBar["FLYING"]:SetPanelColor(1, 1, 0.2, 0.15)
 	    buttonBar["FLYING"]:GetCheckedTexture():SetVertexColor(1, 1, 0.2, 1)
 	    buttonBar["FLYING"].key = "FLYING"
-		buttonBar["FLYING"]:SetChecked(false)
+		buttonBar["FLYING"]:SetChecked(UNCHECKED)
 		buttonBar["FLYING"]:SetScript("OnClick", CheckButton_OnClick)
 		buttonBar["FLYING"]:SetScript("OnEnter", CheckButton_OnEnter)
 		buttonBar["FLYING"]:SetScript("OnLeave", CheckButton_OnLeave)
@@ -349,7 +353,7 @@ local function SetMountCheckButtons()
 	    buttonBar["SWIMMING"]:SetPanelColor(0.2, 0.42, 0.76, 0.15)
 	    buttonBar["SWIMMING"]:GetCheckedTexture():SetVertexColor(0.2, 0.42, 0.76, 1)
 	    buttonBar["SWIMMING"].key = "SWIMMING"
-		buttonBar["SWIMMING"]:SetChecked(false)
+		buttonBar["SWIMMING"]:SetChecked(UNCHECKED)
 		buttonBar["SWIMMING"]:SetScript("OnClick", CheckButton_OnClick)
 		buttonBar["SWIMMING"]:SetScript("OnEnter", CheckButton_OnEnter)
 		buttonBar["SWIMMING"]:SetScript("OnLeave", CheckButton_OnLeave)
@@ -362,7 +366,7 @@ local function SetMountCheckButtons()
 	    buttonBar["SPECIAL"]:SetPanelColor(0.7, 0.1, 0.1, 0.15)
 	    buttonBar["SPECIAL"]:GetCheckedTexture():SetVertexColor(0.7, 0.1, 0.1, 1)
 	    buttonBar["SPECIAL"].key = "SPECIAL"
-		buttonBar["SPECIAL"]:SetChecked(false)
+		buttonBar["SPECIAL"]:SetChecked(UNCHECKED)
 		buttonBar["SPECIAL"]:SetScript("OnClick", CheckButton_OnClick)
 		buttonBar["SPECIAL"]:SetScript("OnEnter", CheckButton_OnEnter)
 		buttonBar["SPECIAL"]:SetScript("OnLeave", CheckButton_OnLeave)
diff --git a/Interface/AddOns/SVUI/setup/configs.lua b/Interface/AddOns/SVUI/setup/configs.lua
index fc10475..0cb41f9 100644
--- a/Interface/AddOns/SVUI/setup/configs.lua
+++ b/Interface/AddOns/SVUI/setup/configs.lua
@@ -350,7 +350,7 @@ SV.configs["SVBar"] = {
 		["mouseover"] = false,
 		["buttons"] = NUM_STANCE_SLOTS,
 		["buttonsPerRow"] = NUM_STANCE_SLOTS,
-		["point"] = "BOTTOMRIGHT",
+		["point"] = "BOTTOMLEFT",
 		["backdrop"] = false,
 		["buttonsize"] = 24,
 		["buttonspacing"] = 5,
diff --git a/Interface/AddOns/SVUI/system/alerts.lua b/Interface/AddOns/SVUI/system/alerts.lua
index 2cf5300..559852d 100644
--- a/Interface/AddOns/SVUI/system/alerts.lua
+++ b/Interface/AddOns/SVUI/system/alerts.lua
@@ -142,6 +142,21 @@ SV.SystemAlert["BUY_BANK_SLOT"] = {
 	timeout = 0,
 	hideOnEscape = 1
 };
+SV.SystemAlert["CONFIRM_BUY_REAGENTBANK_TAB"] = {
+	text = L["Purchase Reagents Bank?"],
+	button1 = YES,
+	button2 = NO,
+	OnAccept = function(self)BuyReagentBank()end,
+	OnShow = function(self)
+		MoneyFrame_Update(self.moneyFrame, GetReagentBankCost());
+		if(SV.SVBag.ReagentFrame) then
+			SV.SVBag.ReagentFrame:UpdateLayout()
+		end
+	end,
+	hasMoneyFrame = 1,
+	timeout = 0,
+	hideOnEscape = 1
+};
 SV.SystemAlert["CANNOT_BUY_BANK_SLOT"] = {
 	text = L["Can't buy anymore slots!"],
 	button1 = ACCEPT,
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petjournal.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petjournal.lua
index 7924b6b..c6c28cf 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petjournal.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petjournal.lua
@@ -94,6 +94,7 @@ FRAME STYLER
 ##########################################################
 ]]--
 local function PetJournalStyle()
+	STYLE.Debugging = true
 	if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.mounts ~= true then return end

 	STYLE:ApplyWindowStyle(PetJournalParent)
@@ -125,7 +126,9 @@ local function PetJournalStyle()
 			local bar = _G["SVUI_MountSelectBar"..i]
 			if(bar) then bar:SetParent(button.Panel) end
 			if(SV.GameVersion >= 60000) then
+				--print(("WoD Button %d"):format(i))
 				if(button.favorite) then
+					--print(("Favorite %d Texture: %s"):format(i, button.favorite:GetTexture()))
 					local fg = CreateFrame("Frame", nil, button)
 					fg:SetSize(40,40)
 					fg:SetPoint("TOPLEFT", button, "TOPLEFT", -1, 1)