Quantcast

Add a really hacky way of displaying equipment tooltips to each button

Adrian L Lange [06-19-14 - 13:25]
Add a really hacky way of displaying equipment tooltips to each button
Filename
Broker_Equipment.lua
diff --git a/Broker_Equipment.lua b/Broker_Equipment.lua
index b58487c..5101a5b 100644
--- a/Broker_Equipment.lua
+++ b/Broker_Equipment.lua
@@ -79,6 +79,11 @@ local function CreateDropdown()
 		info.arg1 = name
 		info.checked = equipped

+		info.tooltipTitle = 'Broker_Equipment_Hack'
+		info.tooltipText = name
+		info.tooltipWhileDisabled = true
+		info.tooltipOnButton = true
+
 		if(pending == name) then
 			info.text = string.format('|cffffff00%s|r', name)
 		elseif(missing > 0) then
@@ -125,3 +130,9 @@ Broker_Equipment:SetScript('OnUpdate', function(self)
 	PaperDollFrame_SetSidebar(nil, 3)
 	self:Hide()
 end)
+
+GameTooltip:HookScript('OnShow', function(self)
+	if(GameTooltipTextLeft1:GetText() == 'Broker_Equipment_Hack') then
+		GameTooltip:SetEquipmentSet(GameTooltipTextLeft2:GetText())
+	end
+end)