vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | |
2 | local set = {name="graveyards"}; |
||
3 | |||
4 | local commonopt = {commonpd="Gy"}; |
||
5 | function set.getpoints(name, map) |
||
6 | if(type(Yatlas_graveyards[map]) == "table") then |
||
7 | for h,v in ipairs(Yatlas_graveyards[map]) do |
||
8 | local x,y = Yatlas_Big2Mini_Coord(v[2],v[1]); |
||
9 | |||
10 | YAPoints_AddPoint(nil, "graveyards", "Graveyard", x, y, commonopt, nil); |
||
11 | end |
||
12 | end |
||
13 | end |
||
14 | |||
15 | |||
16 | function set.setuppoint(point, env, dat) |
||
17 | local text, bg = point.Foreground, point.Icon; |
||
18 | |||
19 | text:SetText(""); |
||
20 | |||
21 | point:Show(); |
||
22 | point:SetOffset(dat.x, dat.y); |
||
23 | |||
24 | bg:Show(); |
||
25 | bg:SetHeight(env.iconsize); |
||
26 | bg:SetWidth(env.iconsize); |
||
27 | bg:SetTexture("Interface\\AddOns\\Yatlas\\images\\Icons\\Icon-Graveyard"); |
||
28 | bg:SetVertexColor(1, 1, 1, 1); |
||
29 | end |
||
30 | |||
31 | function set.setuplegend(point, env, dat) |
||
32 | env.iconsize = 15; |
||
33 | set.setuppoint(point, env, dat); |
||
34 | |||
35 | point.Text:SetText(dat.name); |
||
36 | end |
||
37 | |||
38 | function set.configmenu(name, lm) |
||
39 | if(UIDROPDOWNMENU_MENU_LEVEL == 1) then |
||
40 | local info = {}; |
||
41 | info.text = YATLAS_POINTS_GRAVEYARDS; |
||
42 | info.func = YFOODropDown_do_toggle_normal; |
||
43 | info.checked = YatlasOptions.Frames[lm].PointCfg and not YatlasOptions.Frames[lm].PointCfg[name]; |
||
44 | info.value = name; |
||
45 | info.keepShownOnClick = 1; |
||
46 | UIDropDownMenu_AddButton(info); |
||
47 | end |
||
48 | end |
||
49 | YAPoints_RegisterSet(set); |
||
50 |