vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | local Orig_ChatFrame_OnHyperlinkClick; |
2 | |||
3 | function ZGLOnLoad() |
||
4 | this:RegisterEvent("VARIABLES_LOADED"); |
||
5 | end |
||
6 | |||
7 | function ZGLOnEvent() |
||
8 | if event == "VARIABLES_LOADED" then |
||
9 | Orig_ChatFrame_OnHyperlinkClick = ChatFrame1:GetScript("OnHyperlinkClick"); |
||
10 | ChatFrame1:SetScript("OnHyperlinkClick", ZGLUpdate); |
||
11 | for i = 2, 10 do |
||
12 | if (getglobal("ChatFrame"..i)) then |
||
13 | local cf = getglobal("ChatFrame"..i); |
||
14 | cf:SetScript("OnHyperlinkClick", ZGLUpdate); |
||
15 | end |
||
16 | end |
||
17 | DEFAULT_CHAT_FRAME:AddMessage("ZGLoot geladen", 1.0, 0.0, 0.0); |
||
18 | end |
||
19 | end |
||
20 | |||
21 | function ZGLUpdate() |
||
22 | Orig_ChatFrame_OnHyperlinkClick(); |
||
23 | zglootitem = ItemRefTooltipTextLeft1:GetText(); |
||
24 | zglootwidth = 0; |
||
25 | if (ZGL[zglootitem]) then |
||
26 | for i = 1, 10 do |
||
27 | local zglootlayer = getglobal("ZGLootInfoPanelText"..i); |
||
28 | zglootlayer:Hide(); |
||
29 | end |
||
30 | zglootlines = getn(ZGL[zglootitem]); |
||
31 | for i = 1, zglootlines do |
||
32 | zglootline = getglobal("ZGLootInfoPanelText"..i); |
||
33 | zglootline:SetText(ZGL[zglootitem][i][1]); |
||
34 | zglootline:SetTextColor(ZGL[zglootitem][i][2].r, ZGL[zglootitem][i][2].g, ZGL[zglootitem][i][2].b); --zglicolor[r], zglicolor[g], zglicolor[b]); |
||
35 | zglootline:Show(); |
||
36 | if (zglootwidth < zglootline:GetStringWidth()) then |
||
37 | zglootwidth = zglootline:GetStringWidth() |
||
38 | end |
||
39 | end |
||
40 | ZGLootInfoPanel:SetHeight(14 * zglootlines + 18); |
||
41 | ZGLootInfoPanel:SetWidth(zglootwidth +20); |
||
42 | ZGLootInfoPanel:Show(); |
||
43 | |||
44 | elseif (ZGLootInfoPanel:IsShown()) then |
||
45 | ZGLootInfoPanel:Hide(); |
||
46 | end |
||
47 | end |