public
Description: WoW Powerleveling addon
Homepage: http://www.tekkub.net/
Clone URL: git://github.com/tekkub/tourguide.git
Click here to lend your support to: tourguide and make a donation at www.pledgie.com !
Add LDB data feed
tekkub (author)
Thu Jul 10 00:20:02 -0700 2008
commit  547da21c205fdd92c8886edcd16ccc478aea3f28
tree    1a3b784149d1c558b601793c632f809e45b8ae05
parent  4dd0eba5981ca3fba025a199e54544c01acbc4f4
...
90
91
92
 
93
94
95
...
97
98
99
 
 
100
101
102
...
259
260
261
262
 
263
264
265
...
278
279
280
281
 
 
282
283
284
...
289
290
291
292
 
 
293
294
295
...
302
303
304
305
306
 
 
307
308
309
...
330
331
332
333
 
334
335
336
...
90
91
92
93
94
95
96
...
98
99
100
101
102
103
104
105
...
262
263
264
 
265
266
267
268
...
281
282
283
 
284
285
286
287
288
...
293
294
295
 
296
297
298
299
300
...
307
308
309
 
 
310
311
312
313
314
...
335
336
337
 
338
339
340
341
0
@@ -90,6 +90,7 @@ function TourGuide:PositionStatusFrame()
0
   end
0
 end
0
 
0
+local dataobj = LibStub:GetLibrary("LibDataBroker-1.1"):NewDataObject("TourGuide", {text = "Bah!", icon = TourGuide.icons.KILL})
0
 
0
 function TourGuide:SetText(i)
0
   self.current = 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
 
0
+ dataobj.text, dataobj.icon = newtext, self.icons[action]
0
+
0
   if text:GetText() ~= newtext or icon:GetTexture() ~= self.icons[action] then
0
     oldsize = f:GetWidth()
0
     icon:SetAlpha(0)
0
@@ -259,7 +262,7 @@ function TourGuide:PLAYER_REGEN_ENABLED()
0
 end
0
 
0
 
0
-f:SetScript("OnClick", function(self, btn)
0
+function dataobj.OnClick(self, btn)
0
   if TourGuide.db.char.currentguide == "No Guide" then InterfaceOptionsFrame_OpenToFrame(TourGuide.guidespanel)
0
   else
0
     if btn == "RightButton" then
0
@@ -278,7 +281,8 @@ f:SetScript("OnClick", function(self, btn)
0
       ShowUIPanel(QuestLogFrame)
0
     end
0
   end
0
-end)
0
+end
0
+f:SetScript("OnClick", dataobj.OnClick)
0
 
0
 
0
 check:SetScript("OnClick", function(self, btn) TourGuide:SetTurnedIn() end)
0
@@ -289,7 +293,8 @@ item:HookScript("OnClick", function()
0
 end)
0
 
0
 
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
 
0
@@ -302,8 +307,8 @@ local function ShowTooltip(self)
0
 end
0
 
0
 
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
 
0
 
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:ClearAllPoints()
0
   frame:SetPoint(TourGuide.db.profile.statusframepoint, TourGuide.db.profile.statusframex, TourGuide.db.profile.statusframey)
0
- ShowTooltip(frame)
0
+ dataobj.OnEnter(frame)
0
 end)
0
 
0
 

Comments

    No one has commented yet.