Quantcast

Allow Ctrl- and Alt-clicking quests in the questlog for abandoning and sharing

Adrian L Lange [02-05-12 - 14:45]
Allow Ctrl- and Alt-clicking quests in the questlog for abandoning and sharing
Filename
Monomyth.lua
diff --git a/Monomyth.lua b/Monomyth.lua
index cedcbbd..1870c2a 100644
--- a/Monomyth.lua
+++ b/Monomyth.lua
@@ -149,4 +149,15 @@ Monomyth:Register('BAG_UPDATE', function(bag)
 	end
 end)

+hooksecurefunc('QuestLogTitleButton_OnClick', function(self)
+	if(self.isHeader) then return end
+	QuestLog_SetSelection(self:GetID())
+
+	if(IsControlKeyDown()) then
+		AbandonQuest()
+	elseif(IsAltKeyDown() and GetQuestLogPushable()) then
+		QuestLogPushQuest()
+	end
+end)
+
 QuestInfoDescriptionText.SetAlphaGradient = function() end