a88a019 - Add TellMeWhen replacement
[wowui.git] / OmaRF / RaidFrame.lua
index 03d7ef5..3cde21c 100644 (file)
@@ -29,6 +29,7 @@ local attributes = {};
 
 local CFrame = CreateFrame("Frame", "OmaRFFrame", UIParent);
 local inheritedFrames = "SecureUnitButtonTemplate,SecureHandlerStateTemplate";
 
 local CFrame = CreateFrame("Frame", "OmaRFFrame", UIParent);
 local inheritedFrames = "SecureUnitButtonTemplate,SecureHandlerStateTemplate";
+local barTexture = "Interface\\AddOns\\OmaRF\\images\\minimalist";
 local class = nil;
 local party = {};
 local raid = {};
 local class = nil;
 local party = {};
 local raid = {};
@@ -91,7 +92,7 @@ local function setupFrame(frame, secure, unit)
     frame.background:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -1, 1);
     frame.background:SetColorTexture(unpack(bgColor));
     frame.health = frame:CreateTexture(nil, "BORDER");
     frame.background:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -1, 1);
     frame.background:SetColorTexture(unpack(bgColor));
     frame.health = frame:CreateTexture(nil, "BORDER");
-    frame.health:SetTexture("Interface\\RaidFrame\\Raid-Bar-Hp-Fill");
+    frame.health:SetTexture(barTexture);
     frame.health:SetPoint("TOPLEFT", frame.background, "TOPLEFT");
     frame.health:SetPoint("BOTTOMLEFT", frame.background, "BOTTOMLEFT");
     frame.health:SetVertexColor(unpack(healthColor));
     frame.health:SetPoint("TOPLEFT", frame.background, "TOPLEFT");
     frame.health:SetPoint("BOTTOMLEFT", frame.background, "BOTTOMLEFT");
     frame.health:SetVertexColor(unpack(healthColor));
@@ -103,7 +104,8 @@ local function setupFrame(frame, secure, unit)
     frame.shield = frame:CreateTexture(nil, "BORDER");
     frame.shield:SetPoint("TOPLEFT", frame.health, "TOPRIGHT");
     frame.shield:SetPoint("BOTTOMLEFT", frame.health, "BOTTOMRIGHT");
     frame.shield = frame:CreateTexture(nil, "BORDER");
     frame.shield:SetPoint("TOPLEFT", frame.health, "TOPRIGHT");
     frame.shield:SetPoint("BOTTOMLEFT", frame.health, "BOTTOMRIGHT");
-    frame.shield:SetColorTexture(unpack(shieldColor));
+    frame.shield:SetTexture(barTexture);
+    frame.shield:SetVertexColor(unpack(shieldColor));
     frame.shield:Hide();
     frame.shieldhl = frame:CreateTexture(nil, "ARTWORK");
     frame.shieldhl:SetPoint("TOPLEFT", frame.background, "TOPRIGHT", -1, 0);
     frame.shield:Hide();
     frame.shieldhl = frame:CreateTexture(nil, "ARTWORK");
     frame.shieldhl:SetPoint("TOPLEFT", frame.background, "TOPRIGHT", -1, 0);
@@ -128,7 +130,7 @@ local function setupFrame(frame, secure, unit)
     frame.overlay = frame:CreateTexture(nil, "ARTWORK", nil, 1);
     frame.overlay:SetPoint("TOPLEFT", frame.background, "TOPLEFT");
     frame.overlay:SetPoint("BOTTOMRIGHT", frame.background, "BOTTOMRIGHT");
     frame.overlay = frame:CreateTexture(nil, "ARTWORK", nil, 1);
     frame.overlay:SetPoint("TOPLEFT", frame.background, "TOPLEFT");
     frame.overlay:SetPoint("BOTTOMRIGHT", frame.background, "BOTTOMRIGHT");
-    frame.overlay:SetTexture("Interface\\RaidFrame\\Raid-Bar-Hp-Fill");
+    frame.overlay:SetColorTexture(1, 1, 1);
     frame.overlay:Hide();
     frame.name = frame:CreateFontString(nil, "OVERLAY", "GameFontHighlight");
     frame.name:SetPoint("CENTER", frame.background, "CENTER", 0, 11);
     frame.overlay:Hide();
     frame.name = frame:CreateFontString(nil, "OVERLAY", "GameFontHighlight");
     frame.name:SetPoint("CENTER", frame.background, "CENTER", 0, 11);
@@ -145,6 +147,12 @@ local function setupFrame(frame, secure, unit)
     frame.ready:SetPoint("TOPLEFT", frame.background, "BOTTOMLEFT", 0, 14);
     frame.ready:SetPoint("BOTTOMRIGHT", frame.background, "BOTTOMLEFT", 14, 0);
     frame.ready:Hide();
     frame.ready:SetPoint("TOPLEFT", frame.background, "BOTTOMLEFT", 0, 14);
     frame.ready:SetPoint("BOTTOMRIGHT", frame.background, "BOTTOMLEFT", 14, 0);
     frame.ready:Hide();
+    frame.targeticon = frame:CreateTexture(nil, "OVERLAY");
+    frame.targeticon:SetPoint("CENTER", frame.background, "TOP");
+    frame.targeticon:SetWidth(12);
+    frame.targeticon:SetHeight(12);
+    frame.targeticon:SetTexture("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcons");
+    frame.targeticon:Hide();
     -- set up indicators
     setupIndicators(frame, class);
     -- set scripts
     -- set up indicators
     setupIndicators(frame, class);
     -- set scripts
@@ -270,6 +278,7 @@ local function initialize()
     _, class = UnitClass("player");
     anchorX, anchorY = Settings.Character.AnchorX, Settings.Character.AnchorY;
     attributes = Settings.Character.Clickheal;
     _, class = UnitClass("player");
     anchorX, anchorY = Settings.Character.AnchorX, Settings.Character.AnchorY;
     attributes = Settings.Character.Clickheal;
+    CFrame:SetFrameStrata("LOW");
     CFrame:SetPoint("CENTER", nil, "CENTER", anchorX, anchorY);
     CFrame:SetHeight((height+2)*8);
     CFrame:SetWidth((width+2)*5);
     CFrame:SetPoint("CENTER", nil, "CENTER", anchorX, anchorY);
     CFrame:SetHeight((height+2)*8);
     CFrame:SetWidth((width+2)*5);
@@ -314,10 +323,10 @@ local function hideBlizzardRaid()
     hideBlizzardRaidButton();
 
     -- hide focus frame
     hideBlizzardRaidButton();
 
     -- hide focus frame
-    for _, frame in pairs({FocusFrame, FocusFrameToT}) do
+    for _, frame in pairs({FocusFrame, FocusFrameToT, FocusFrameSpellBar}) do
         frame:UnregisterAllEvents();
         frame:UnregisterAllEvents();
-        frame.healthbar:UnregisterAllEvents();
-        frame.manabar:UnregisterAllEvents();
+        if frame.healthbar then frame.healthbar:UnregisterAllEvents() end
+        if frame.manabar then frame.manabar:UnregisterAllEvents() end
         if frame.spellbar then frame.spellbar:UnregisterAllEvents() end
         if frame.powerBarAlt then frame.powerBarAlt:UnregisterAllEvents() end
         frame:Hide();
         if frame.spellbar then frame.spellbar:UnregisterAllEvents() end
         if frame.powerBarAlt then frame.powerBarAlt:UnregisterAllEvents() end
         frame:Hide();