e8f2d3b - Change bar texture, explicitly hide focus spell bar
authorAleksi Blinnikka <aleksi.blinnikka@gmail.com>
Sun, 4 Feb 2018 18:50:12 +0000
committerAleksi Blinnikka <aleksi.blinnikka@gmail.com>
Sun, 4 Feb 2018 18:50:12 +0000
OmaRF/RaidFrame.lua
OmaRF/images/minimalist.tga [new file with mode: 0644]

index f8ca89f..3cde21c 100644 (file)
@@ -29,6 +29,7 @@ local attributes = {};
 
 local CFrame = CreateFrame("Frame", "OmaRFFrame", UIParent);
 local inheritedFrames = "SecureUnitButtonTemplate,SecureHandlerStateTemplate";
+local barTexture = "Interface\\AddOns\\OmaRF\\images\\minimalist";
 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.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));
@@ -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: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);
@@ -276,6 +278,7 @@ local function initialize()
     _, 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);
@@ -320,10 +323,10 @@ local function hideBlizzardRaid()
     hideBlizzardRaidButton();
 
     -- hide focus frame
-    for _, frame in pairs({FocusFrame, FocusFrameToT}) do
+    for _, frame in pairs({FocusFrame, FocusFrameToT, FocusFrameSpellBar}) do
         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();
diff --git a/OmaRF/images/minimalist.tga b/OmaRF/images/minimalist.tga
new file mode 100644 (file)
index 0000000..030bc83
Binary files /dev/null and b/OmaRF/images/minimalist.tga differ