From a29055d0bc17b80f256e19cb734b2f8cbac9da46 Mon Sep 17 00:00:00 2001 From: Alex Shubert Date: Sat, 24 Mar 2012 18:39:58 +0400 Subject: [PATCH] ldb added --- AutoTurnIn.lua | 19 +++++- embeds.xml | 3 + libs/LibDataBroker-1.1/LibDataBroker-1.1.lua | 90 ++++++++++++++++++++++++++ 3 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 libs/LibDataBroker-1.1/LibDataBroker-1.1.lua diff --git a/AutoTurnIn.lua b/AutoTurnIn.lua index 657f85c..f12bd1a 100644 --- a/AutoTurnIn.lua +++ b/AutoTurnIn.lua @@ -209,4 +209,21 @@ function AutoTurnIn:QUEST_COMPLETE() GetQuestReward(index) end end -end \ No newline at end of file +end + + +local LDB = LibStub:GetLibrary("LibDataBroker-1.1") +if LDB then + local dataObj = LDB:NewDataObject("AutoTurnIn", { + type = "launcher", + icon = "Interface\\QUESTFRAME\\UI-QuestLog-BookIcon", + text="AutoTurnIn", + OnClick = function(clickedframe, button) + if InterfaceOptionsFrame:IsVisible() then + InterfaceOptionsFrameCancel:Click() + else + InterfaceOptionsFrame_OpenToCategory(_G["AutoTurnInOptionsPanel"]) + end + end, + }) +end diff --git a/embeds.xml b/embeds.xml index 84d0c59..72da9be 100644 --- a/embeds.xml +++ b/embeds.xml @@ -1,7 +1,10 @@