0
@@ -90,6 +90,7 @@ function TourGuide:PositionStatusFrame()
0
+local dataobj = LibStub:GetLibrary("LibDataBroker-1.1"):NewDataObject("TourGuide", {text = "Bah!", icon = TourGuide.icons.KILL})
0
function TourGuide:SetText(i)
0
@@ -97,6 +98,8 @@ function TourGuide:SetText(i)
0
local note = self:GetObjectiveTag("N")
0
local newtext = (quest or"???")..(note and " [?]" or "")
0
+ dataobj.text, dataobj.icon = newtext, self.icons[action]
0
if text:GetText() ~= newtext or icon:GetTexture() ~= self.icons[action] then
0
@@ -259,7 +262,7 @@ function TourGuide:PLAYER_REGEN_ENABLED()
0
-f
:SetScript("OnClick", function(self, btn)
0
+f
unction dataobj.OnClick(self, btn)
0
if TourGuide.db.char.currentguide == "No Guide" then InterfaceOptionsFrame_OpenToFrame(TourGuide.guidespanel)
0
if btn == "RightButton" then
0
@@ -278,7 +281,8 @@ f:SetScript("OnClick", function(self, btn)
0
ShowUIPanel(QuestLogFrame)
0
+f:SetScript("OnClick", dataobj.OnClick)
0
check:SetScript("OnClick", function(self, btn) TourGuide:SetTurnedIn() end)
0
@@ -289,7 +293,8 @@ item:HookScript("OnClick", function()
0
-local function ShowTooltip(self)
0
+function dataobj.OnLeave() GameTooltip:Hide() end
0
+function dataobj.OnEnter(self)
0
local tip = TourGuide:GetObjectiveTag("N")
0
if not tip then return end
0
@@ -302,8 +307,8 @@ local function ShowTooltip(self)
0
-f:SetScript("OnLeave", function() GameTooltip:Hide() end)
0
-f:SetScript("OnEnter", ShowTooltip)
0
+f:SetScript("OnLeave", dataobj.OnLeave)
0
+f:SetScript("OnEnter", dataobj.OnEnter)
0
local function GetUIParentAnchor(frame)
0
@@ -330,7 +335,7 @@ f:SetScript("OnDragStop", function(frame)
0
TourGuide.db.profile.statusframepoint, TourGuide.db.profile.statusframex, TourGuide.db.profile.statusframey = GetUIParentAnchor(frame)
0
frame:SetPoint(TourGuide.db.profile.statusframepoint, TourGuide.db.profile.statusframex, TourGuide.db.profile.statusframey)
0
+
dataobj.OnEnter(frame)
Comments
No one has commented yet.