public
Description: WoW Addon - LDB Guild data feed
Homepage: http://www.tekkub.net/
Clone URL: git://github.com/tekkub/picoguild.git
Click here to lend your support to: picoguild and make a donation at www.pledgie.com !
Add LDB-1.1
tekkub (author)
Tue May 13 22:08:39 -0700 2008
commit  5b8f714721b28299723e42510ca0d52fdb51c275
tree    9dcd0952d85640a8aa5bb8f50d3b30e93897f6ac
parent  f6cda9f5fb800fe7aa25779d36e0b93d3a6af741
...
32
33
34
 
 
 
 
35
36
37
...
96
97
98
99
100
 
 
 
101
102
103
...
114
115
116
117
118
 
 
119
120
121
...
139
140
141
142
 
143
144
145
146
147
 
 
148
149
150
151
 
 
 
 
 
 
152
153
154
155
156
157
158
 
 
159
 
 
 
...
32
33
34
35
36
37
38
39
40
41
...
100
101
102
 
 
103
104
105
106
107
108
...
119
120
121
 
 
122
123
124
125
126
...
144
145
146
 
147
148
149
 
 
 
150
151
152
 
 
 
153
154
155
156
157
158
159
160
161
162
163
164
 
165
166
167
168
169
170
0
@@ -32,6 +32,10 @@ local lego = DongleStub("LegoBlock-Beta0"):New("GuildBlock", L["No Guild"], "Int
0
 --~ if tekDebug then GuildBlock:EnableDebug(1, tekDebug:GetFrame("GuildBlock")) end
0
 
0
 
0
+local dataobj = {icon = "Interface\\Addons\\GuildBlock\\icon", text = L["No Guild"]}
0
+LibStub:GetLibrary("LibDataBroker-1.1"):NewDataObject("GuildBlock", dataobj)
0
+
0
+
0
 ----------------------------------
0
 -- Server query timer --
0
 ----------------------------------
0
@@ -96,8 +100,9 @@ function GuildBlock:GUILD_ROSTER_UPDATE()
0
 
0
   if IsInGuild() then
0
     for i = 1,GetNumGuildMembers(true) do if select(9, GetGuildRosterInfo(i)) then online = online + 1 end end
0
- lego:SetText(string.format("%d/%d", online, GetNumGuildMembers(true)))
0
- else lego:SetText(L["No Guild"]) end
0
+ dataobj.text = string.format("%d/%d", online, GetNumGuildMembers(true))
0
+ else dataobj.text = L["No Guild"] end
0
+ lego:SetText(dataobj.text)
0
 end
0
 
0
 
0
@@ -114,8 +119,8 @@ local function GetTipAnchor(frame)
0
 end
0
 
0
 
0
-lego:SetScript("OnLeave", function() GameTooltip:Hide() end)
0
-lego:SetScript("OnEnter", function(self)
0
+function dataobj.OnLeave() GameTooltip:Hide() end
0
+function dataobj.OnEnter(self)
0
    GameTooltip:SetOwner(self, "ANCHOR_NONE")
0
   GameTooltip:SetPoint(GetTipAnchor(self))
0
   GameTooltip:ClearLines()
0
@@ -139,21 +144,27 @@ lego:SetScript("OnEnter", function(self)
0
   end
0
 
0
   GameTooltip:Show()
0
-end)
0
+end
0
 
0
 
0
-------------------------------------------
0
--- Click to open friend panel --
0
-------------------------------------------
0
+lego:SetScript("OnEnter", dataobj.OnEnter)
0
+lego:SetScript("OnLeave", dataobj.OnLeave)
0
 
0
-lego:EnableMouse(true)
0
-lego:RegisterForClicks("anyUp")
0
-lego:SetScript("OnClick", function()
0
+
0
+-----------------------------------------
0
+-- Click to open guild panel --
0
+-----------------------------------------
0
+
0
+function dataobj.OnClick()
0
   if FriendsFrame:IsVisible() then HideUIPanel(FriendsFrame)
0
   else
0
     ToggleFriendsFrame(3)
0
     FriendsFrame_Update()
0
     GameTooltip:Hide()
0
   end
0
-end)
0
+end
0
+
0
 
0
+lego:EnableMouse(true)
0
+lego:RegisterForClicks("anyUp")
0
+lego:SetScript("OnClick", dataobj.OnClick)
...
15
16
17
 
 
 
 
18
...
15
16
17
18
19
20
21
22
0
@@ -15,4 +15,8 @@
0
 Dongle.lua
0
 LegoBlock.lua
0
 
0
+LibStub.lua
0
+CallbackHandler-1.0.lua
0
+LibDataBroker-1.1\LibDataBroker-1.1.lua
0
+
0
 GuildBlock.lua

Comments

    No one has commented yet.