187bc84 - Invalidate button.prev when slot changes
[wowui.git] / OmaRF / DruidIndicators.lua
1 -- DruidIndicators.lua
2 local pairs = pairs;
3
4 local indSize = OmaRFSettings.IndSize;
5 local rhomb = "Interface\\AddOns\\OmaRF\\images\\rhomb";
6 local square = "Interface\\AddOns\\OmaRF\\images\\square";
7
8 local M = {};
9 OmaRFIndicators.Class["DRUID"] = M;
10 M.Auras = {
11     [33763] = "TOPLEFT", -- Lifebloom
12     [774] = "TR1", -- Rejuvenation
13     [102352] = "TR2", -- Cenarion Ward (102351 is the 30-sec buff before the HoT)
14     [207386] = "TR3", -- Spring Blossoms (207385 is the talent)
15     [155777] = "TR3", -- Germination (either Spring Blossoms or this taken)
16     [8936] = "TR4", -- Regrowth
17     [200389] = "TR5", -- Cultivation
18 }
19
20 function M.Setup(base)
21     local inds = {};
22     for _, pos in pairs({"TOPLEFT"}) do
23         inds[pos] = base:CreateTexture(nil, "OVERLAY");
24         inds[pos]:SetPoint(pos, base, pos);
25         inds[pos]:SetWidth(indSize);
26         inds[pos]:SetHeight(indSize);
27         inds[pos]:SetTexture(rhomb);
28         inds[pos]:SetVertexColor(0, 1, 0.5);
29         inds[pos]:Hide();
30         inds[pos].text = base:CreateFontString(nil, "OVERLAY", "GameFontHighlight");
31         inds[pos].text:SetPoint("BOTTOMRIGHT", inds[pos], "BOTTOMRIGHT");
32         inds[pos].text:Hide();
33     end
34     for _, pos in pairs({"TR1", "TR2", "TR3", "TR4", "TR5"}) do
35         inds[pos] = base:CreateTexture(nil, "OVERLAY");
36         inds[pos]:SetWidth(indSize/2);
37         inds[pos]:SetHeight(indSize/2);
38         inds[pos]:SetTexture(square);
39         inds[pos]:Hide();
40     end
41     inds["TR1"]:SetPoint("TOPRIGHT");
42     inds["TR1"]:SetVertexColor(0.8, 0, 1);
43     inds["TR2"]:SetPoint("TOPRIGHT", inds["TR1"], "TOPLEFT");
44     inds["TR2"]:SetVertexColor(0.4, 1, 0);
45     inds["TR3"]:SetPoint("TOPRIGHT", inds["TR1"], "BOTTOMRIGHT");
46     inds["TR3"]:SetVertexColor(1, 0.2, 0);
47     inds["TR4"]:SetPoint("TOPRIGHT", inds["TR2"], "BOTTOMRIGHT");
48     inds["TR4"]:SetVertexColor(0, 1, 0);
49     inds["TR5"]:SetPoint("TOPRIGHT", inds["TR3"], "BOTTOMRIGHT");
50     inds["TR5"]:SetVertexColor(0, 1, 0.5);
51     return inds;
52 end