public
Description: WoW Addon - Better minimap blips
Homepage: http://www.tekkub.net/
Clone URL: git://github.com/tekkub/blipstick.git
Click here to lend your support to: blipstick and make a donation at www.pledgie.com !
Add savedavar
tekkub (author)
Sun Apr 20 14:08:39 -0700 2008
commit  194fe12e96fa22a45e040a5000b38dff59ff81b1
tree    67a8d9e5e7987d48225500aa3c0a7fc899b84500
parent  ebd03d6ce8b9d993c8340366bb628e2a79d826cb
...
1
2
3
 
 
 
4
5
 
 
6
 
 
7
8
 
 
 
9
 
 
 
 
10
11
12
13
 
 
 
14
15
 
 
 
16
17
18
19
20
 
 
 
21
22
23
24
25
...
27
28
29
 
30
31
32
33
34
 
35
36
37
...
39
40
41
 
42
43
44
...
1
 
 
2
3
4
5
 
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 
 
 
22
23
24
25
 
26
27
28
29
30
 
 
 
31
32
33
34
 
35
36
37
...
39
40
41
42
43
44
45
46
 
47
48
49
50
...
52
53
54
55
56
57
58
0
@@ -1,25 +1,37 @@
0
 
0
-local path = "Interface\\AddOns\\Blipstick\\"
0
-local textures = {"Default", "SmallExclaim", "LittleExclaim", "Nandini", "Nandini-black", "AlternateBlips"}
0
+----------------------
0
+-- Locals --
0
+----------------------
0
 
0
-Minimap:SetBlipTexture("Interface\\AddOns\\Blipstick\\SmallExclaim")
0
+local GAP, EDGEGAP, ROWHEIGHT = 8, 16, 43
0
+local DEFAULTPATH = "Interface\\Minimap\\ObjectIcons"
0
 
0
+local path = "Interface\\AddOns\\Blipstick\\"
0
+local textures = {"Default", "SmallExclaim", "LittleExclaim", "Nandini", "Nandini-black", "AlternateBlips"}
0
 
0
 
0
+------------------------------
0
+-- Initialization --
0
+------------------------------
0
 
0
+local frame = CreateFrame("Frame", nil, UIParent)
0
+frame:RegisterEvent("ADDON_LOADED")
0
+frame:SetScript("OnEvent", function (self, event, addon)
0
+ if addon ~= "Blipstick" then return end
0
 
0
-----------------------
0
--- Locals --
0
-----------------------
0
+ BlipStickDB = BlipStickDB or {texture = "SmallExclaim"}
0
+ self.db = BlipStickDB
0
+ Minimap:SetBlipTexture(self.db.texture == "Default" and DEFAULTPATH or path..self.db.texture)
0
 
0
-local GAP, EDGEGAP, ROWHEIGHT = 8, 16, 43
0
+ self:UnregisterEvent("ADDON_LOADED")
0
+ f:SetScript("OnEvent", nil)
0
+end)
0
 
0
 
0
----------------------
0
--- Panel --
0
----------------------
0
+----------------------------
0
+-- Config Panel --
0
+----------------------------
0
 
0
-local frame = CreateFrame("Frame", nil, UIParent)
0
 frame.name = "Blipstick"
0
 frame:Hide()
0
 frame:SetScript("OnShow", function(frame)
0
@@ -27,11 +39,12 @@ frame:SetScript("OnShow", function(frame)
0
 
0
   local anchor, rows = subtitle, {}
0
   local function OnClick(self)
0
+ frame.db.texture = self.texture
0
     Minimap:SetBlipTexture(self.texture)
0
     for _,row in pairs(rows) do row:SetChecked(row == self) end
0
   end
0
   for _,name in ipairs(textures) do
0
- local texture = name == "Default" and "Interface\\Minimap\\ObjectIcons" or path..name
0
+ local texture = name == "Default" and DEFAULTPATH or path..name
0
 
0
     local row = CreateFrame("CheckButton", nil, frame)
0
     row:SetHeight(ROWHEIGHT)
0
@@ -39,6 +52,7 @@ frame:SetScript("OnShow", function(frame)
0
     row:SetPoint("LEFT", frame, "LEFT", EDGEGAP, 0)
0
     row:SetPoint("RIGHT", frame, "RIGHT", -EDGEGAP, 0)
0
 
0
+ row:SetChecked(name == frame.db.texture)
0
     row.texture = texture
0
     row:SetScript("OnClick", OnClick)
0
 
...
8
9
10
 
 
11
12
13
...
8
9
10
11
12
13
14
15
0
@@ -8,6 +8,8 @@
0
 ## X-Email: tekkub-wow@googlegroups.com
0
 ## X-Category: Map
0
 
0
+## SavedVariables: BlipStickDB
0
+
0
 ## LoadManagers: AddonLoader
0
 ## X-LoadOn-Always: delayed
0
 

Comments

    No one has commented yet.