local GameTooltip_SetDefaultAnchor = nil;
local registerUnitEvents = OmaUFEvents.RegisterUnitEvents;
+local registerCastEvents = OmaUFCastBar.RegisterCastEvents;
+local unregisterCastEvents = OmaUFCastBar.UnregisterCastEvents;
local unitEvent = OmaUFEvents.UnitEvent;
local Settings = OmaUFSettings;
local attributes = {};
local inheritedFrames = "SecureUnitButtonTemplate,SecureHandlerStateTemplate";
+local barTexture = "Interface\\AddOns\\OmaRF\\images\\minimalist";
local function frameShow(frame)
frame:RegisterEvent("PLAYER_ENTERING_WORLD");
frame:RegisterEvent("UNIT_TARGETABLE_CHANGED");
frame:RegisterUnitEvent("UNIT_LEVEL", frame.unit);
registerUnitEvents(frame);
+ registerCastEvents(frame.castbar);
unitEvent(frame, "UPDATE_ALL_BARS");
end
local function frameHide(frame)
frame:UnregisterAllEvents();
+ unregisterCastEvents(frame.castbar);
end
local function showTooltip(secure)
frame.healthback = frame:CreateTexture(nil, "BACKGROUND", nil, 1);
frame.healthback:SetPoint("TOPLEFT", frame, "TOPLEFT", 1, -1);
frame.healthback:SetPoint("BOTTOMRIGHT", frame, "RIGHT", -1, -5);
- frame.healthback:SetTexture("Interface\\RaidFrame\\Raid-Bar-Hp-Fill");
+ frame.healthback:SetTexture(barTexture);
frame.healthback:SetVertexColor(unpack(bgColor));
frame.health = frame:CreateTexture(nil, "BORDER");
frame.health:SetPoint("TOPLEFT", frame.healthback, "TOPLEFT");
frame.health:SetPoint("BOTTOMLEFT", frame.healthback, "BOTTOMLEFT");
- frame.health:SetTexture("Interface\\RaidFrame\\Raid-Bar-Hp-Fill");
+ frame.health:SetTexture(barTexture);
frame.health:SetVertexColor(unpack(healthColor));
frame.healthText = frame:CreateFontString(nil, "ARTWORK", "GameFontHighlight");
- frame.healthText:SetPoint("RIGHT", frame.healthback, "RIGHT", -2, 0);
+ frame.healthText:SetPoint("RIGHT", frame.healthback, "RIGHT", -2, 1);
frame.healthText.percent = true;
frame.manaback = frame:CreateTexture(nil, "BACKGROUND", nil, 1);
frame.manaback:SetPoint("TOPLEFT", frame, "LEFT", 1, -5);
frame.manaback:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -1, 1);
- frame.manaback:SetTexture("Interface\\RaidFrame\\Raid-Bar-Hp-Fill");
+ frame.manaback:SetTexture(barTexture);
frame.manaback:SetVertexColor(unpack(bgColor));
frame.mana = frame:CreateTexture(nil, "BORDER");
frame.mana:SetPoint("TOPLEFT", frame.manaback, "TOPLEFT");
frame.mana:SetPoint("BOTTOMLEFT", frame.manaback, "BOTTOMLEFT");
- frame.mana:SetTexture("Interface\\RaidFrame\\Raid-Bar-Hp-Fill");
+ frame.mana:SetTexture(barTexture);
frame.manaText = frame:CreateFontString(nil, "ARTWORK", "GameFontWhiteTiny");
frame.manaText:SetPoint("RIGHT", frame.manaback, "RIGHT", -2, 0);
frame.manaText:Hide();
frame.shield = frame:CreateTexture(nil, "BORDER");
frame.shield:SetPoint("TOPLEFT", frame.health, "TOPRIGHT");
frame.shield:SetPoint("BOTTOMLEFT", frame.health, "BOTTOMRIGHT");
- frame.shield:SetTexture("Interface\\RaidFrame\\Shield-Fill");
+ frame.shield:SetTexture(barTexture);
frame.shield:SetVertexColor(unpack(shieldColor));
frame.shield:Hide();
frame.shieldhl = frame:CreateTexture(nil, "ARTWORK");
frame.name:SetPoint("LEFT", frame.healthback, "LEFT", 2, 1);
frame.name.count = 10;
frame.level = frame:CreateFontString(nil, "OVERLAY", "GameFontWhiteTiny");
- frame.level:SetPoint("LEFT", frame.manaback, "LEFT", 2, 1);
+ frame.level:SetPoint("LEFT", frame.manaback, "LEFT", 2, 0);
frame.targeticon = frame:CreateTexture(nil, "OVERLAY");
frame.targeticon:SetPoint("CENTER", frame.healthback, "TOP");
frame.targeticon:SetWidth(16);
frame.targeticon:SetHeight(16);
frame.targeticon:SetTexture("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcons");
frame.targeticon:Hide();
+ frame.castbar = OmaUFCastBar.CreateCastBar(frame, unit, -height-24);
-- set scripts
frame:SetScript("OnShow", frameShow);
frame:SetScript("OnHide", frameHide);
createFrame("OmaBoss1", "OmaBossSecure1", parent, "boss1", anchorX, anchorY);
for i = 2,MAX_BOSS_FRAMES do
- createFrame("OmaBoss"..i, "OmaBossSecure"..i, _G["OmaBoss"..(i-1)], "boss"..i, 0, -height-15);
+ createFrame("OmaBoss"..i, "OmaBossSecure"..i, _G["OmaBoss"..(i-1)], "boss"..i, 0, -height-26);
end
-- Arena frames are in the same spot
createFrame("OmaArena1", "OmaArenaSecure1", parent, "arena1", anchorX, anchorY);
-- MAX_ARENA_ENEMIES from AddOns/Blizzard_ArenaUI/Blizzard_ArenaUI.lua not available
-- as the addon is not loaded yet, update manually if it changes
for i = 2,5 do
- createFrame("OmaArena"..i, "OmaArenaSecure"..i, _G["OmaArena"..(i-1)], "arena"..i, 0, -height-15);
+ createFrame("OmaArena"..i, "OmaArenaSecure"..i, _G["OmaArena"..(i-1)], "arena"..i, 0, -height-26);
end
end
--- /dev/null
+-- CastBar.lua
+local _;
+local unpack = unpack;
+local ssub = string.sub;
+local min = math.min;
+local ceil = math.ceil;
+local UnitCastingInfo, UnitChannelInfo = UnitCastingInfo, UnitChannelInfo;
+local GetTime = GetTime;
+
+local barTexture = "Interface\\AddOns\\OmaRF\\images\\minimalist";
+local castingColor = {1, 0.49, 0}; -- from Quartz defaults
+local nointerruptColor = {0.6, 0.6, 0.6};
+local channelingColor = {0.32, 0.3, 1};
+
+local M = {};
+OmaUFCastBar = M;
+
+local function onUpdate(bar)
+ if not bar:IsShown() then return end -- TODO little fadeout possibly
+ local width = bar.icon:IsShown() and bar.cast.width or bar.cast.width; -- TODO fullwidth
+ local startTime, endTime = bar.startTime, bar.endTime;
+ local currentClamped = min(GetTime(), endTime);
+ local remaining = endTime - currentClamped;
+ local percent;
+ if bar.channeling then
+ percent = remaining / (endTime - startTime);
+ else
+ percent = (currentClamped - startTime) / (endTime - startTime);
+ end
+
+ width = percent*width;
+ if width <= 0 then
+ bar.cast:SetWidth(0.1);
+ else
+ bar.cast:SetWidth(width);
+ end
+ bar.time:SetFormattedText("%.1f", remaining);
+end
+
+local function toggleInterruptible(bar, nointr)
+ if bar.unit == "player" then return end
+ if nointr then
+ bar.cast:SetVertexColor(unpack(nointerruptColor));
+ bar.shield:Show();
+ else
+ bar.cast:SetVertexColor(unpack(castingColor));
+ bar.shield:Hide();
+ end
+end
+
+local function startCast(bar, unit, channeling)
+ local name, icon, startTime, endTime, noInterrupt, id;
+ if channeling then
+ name, _, _, icon, startTime, endTime, _, noInterrupt = UnitChannelInfo(unit);
+ bar.channeling = true;
+ else
+ _, _, name, icon, startTime, endTime, _, _, noInterrupt, id = UnitCastingInfo(unit);
+ bar.channeling = nil;
+ end
+ if not startTime or not endTime then return nil end
+ bar.startTime = startTime / 1000;
+ bar.endTime = endTime / 1000;
+ -- don't show samwise for non-existent icons
+ if icon ~= "Interface\\Icons\\Temp" then
+ bar.icon:SetTexture(icon);
+ bar.icon:Show();
+ bar.cast:SetWidth(channeling and bar.cast.width or 0.1);
+ else
+ bar.icon:Hide();
+ bar.cast:SetWidth(channeling and bar.cast.width or 0.1); -- TODO use fullwidth
+ end
+ bar.spell:SetText(ssub(name, 1, bar.spell.count));
+ bar.time:SetFormattedText("%.1f", (endTime - startTime)/1000);
+ bar:Show();
+ toggleInterruptible(bar, noInterrupt);
+ return true;
+end
+
+local function applyDelay(bar, unit, channeling)
+ local startTime, endTime;
+ if channeling then
+ _, _, _, _, startTime, endTime = UnitChannelInfo(unit);
+ else
+ _, _, _, _, startTime, endTime = UnitCastingInfo(unit);
+ end
+ if not startTime or not endTime then return bar:Hide() end
+ bar.startTime = startTime / 1000;
+ bar.endTime = endTime / 1000;
+ -- TODO show delay text
+end
+
+local events = {
+ ["UNIT_SPELLCAST_START"] = function(bar, unit)
+ startCast(bar, unit);
+ end,
+ ["UNIT_SPELLCAST_CHANNEL_START"] = function(bar, unit)
+ startCast(bar, unit, true);
+ end,
+ ["UNIT_SPELLCAST_STOP"] = function(bar, unit)
+ bar:Hide();
+ end,
+ ["UNIT_SPELLCAST_DELAYED"] = function(bar, unit)
+ applyDelay(bar, unit);
+ end,
+ ["UNIT_SPELLCAST_CHANNEL_UPDATE"] = function(bar, unit)
+ applyDelay(bar, unit, true);
+ end,
+ ["UNIT_SPELLCAST_INTERRUPTIBLE"] = function(bar)
+ toggleInterruptible(bar, false);
+ end,
+ ["UNIT_SPELLCAST_NOT_INTERRUPTIBLE"] = function(bar)
+ toggleInterruptible(bar, true);
+ end,
+};
+events["UNIT_SPELLCAST_CHANNEL_STOP"] = events["UNIT_SPELLCAST_STOP"];
+
+local function onEvent(bar, event, unit)
+ if unit == bar.unit or (bar.unit == "player" and unit == "vehicle") then
+ --print(unit, event)
+ events[event](bar, unit);
+ end
+end
+
+function M.RegisterCastEvents(bar)
+ --bar:RegisterEvent("UNIT_SPELLCAST_SENT");
+ bar:RegisterEvent("UNIT_SPELLCAST_START");
+ bar:RegisterEvent("UNIT_SPELLCAST_STOP");
+ --bar:RegisterEvent("UNIT_SPELLCAST_FAILED");
+ --bar:RegisterEvent("UNIT_SPELLCAST_INTERRUPTED");
+ bar:RegisterEvent("UNIT_SPELLCAST_DELAYED");
+ bar:RegisterEvent("UNIT_SPELLCAST_CHANNEL_START");
+ bar:RegisterEvent("UNIT_SPELLCAST_CHANNEL_STOP");
+ bar:RegisterEvent("UNIT_SPELLCAST_CHANNEL_UPDATE");
+ bar:RegisterEvent("UNIT_SPELLCAST_INTERRUPTIBLE");
+ bar:RegisterEvent("UNIT_SPELLCAST_NOT_INTERRUPTIBLE");
+ bar:SetScript("OnUpdate", onUpdate);
+ -- trigger initial check
+ if not startCast(bar, bar.unit) then
+ startCast(bar, bar.unit, true);
+ end
+end
+
+function M.UnregisterCastEvents(bar)
+ bar:UnregisterAllEvents();
+ bar:SetScript("OnUpdate", nil);
+end
+
+function M.CreateCastBar(parent, unit, yoffset)
+ local bar = CreateFrame("Frame", parent:GetName().."CastBar", parent);
+ bar.unit = unit;
+ bar:SetPoint("BOTTOMLEFT", parent, "TOPLEFT", 0, yoffset);
+ bar:SetPoint("BOTTOMRIGHT", parent, "TOPRIGHT", 0, yoffset);
+ bar:SetHeight(22);
+ bar:Hide();
+ bar.back = bar:CreateTexture(nil, "BACKGROUND");
+ bar.back:SetAllPoints();
+ bar.back:SetColorTexture(0, 0, 0, 0.7);
+ bar.icon = bar:CreateTexture(nil, "ARTWORK", 1);
+ bar.icon:SetPoint("TOPLEFT", bar, "TOPLEFT", 1, -1);
+ bar.icon:SetPoint("BOTTOMRIGHT", bar, "BOTTOMLEFT", 21, 1);
+ bar.icon:SetTexCoord(0.07, 0.93, 0.07, 0.93); -- remove borders (from Quartz)
+ bar.shield = bar:CreateTexture(nil, "ARTWORK");
+ bar.shield:SetPoint("CENTER", bar.icon, "CENTER", -2, -1);
+ bar.shield:SetWidth(28);
+ bar.shield:SetHeight(50);
+ bar.shield:SetTexture("Interface\\CastingBar\\UI-CastingBar-Small-Shield");
+ bar.shield:SetTexCoord(0, 36/256, 0, 1);
+ bar.shield:Hide();
+ bar.cast = bar:CreateTexture(nil, "ARTWORK");
+ bar.cast:SetPoint("TOPLEFT", bar.icon, "TOPRIGHT", 1, 0);
+ bar.cast:SetPoint("BOTTOMLEFT", bar.icon, "BOTTOMRIGHT", 1, 0);
+ bar.cast.width = bar:GetWidth() - bar.icon:GetWidth() - 3;
+ bar.cast.fullwidth = bar:GetWidth() - 2; -- for casts without icon
+ bar.cast:SetWidth(bar.cast.width);
+ bar.cast:SetTexture(barTexture);
+ bar.cast:SetVertexColor(unpack(castingColor));
+ bar.spell = bar:CreateFontString(nil, "OVERLAY", "GameFontHighlight");
+ bar.spell:SetPoint("LEFT", bar.icon, "RIGHT", 2, 0);
+ bar.spell.count = ceil(bar.cast:GetWidth()/10);
+ bar.time = bar:CreateFontString(nil, "OVERLAY", "GameFontHighlight");
+ bar.time:SetPoint("RIGHT", bar, "RIGHT", -2, 0);
+ bar:SetScript("OnEvent", onEvent);
+ return bar;
+end
Settings.lua
Auras.lua
+CastBar.lua
Events.lua
UnitFrames.lua
PlayerFrame.lua
local attributes = {};
local inheritedFrames = "SecureUnitButtonTemplate,SecureHandlerStateTemplate";
+local barTexture = "Interface\\AddOns\\OmaRF\\images\\minimalist";
local function frameShow(frame)
frame:RegisterEvent("UNIT_ENTERED_VEHICLE");
frame.healthback = frame:CreateTexture(nil, "BACKGROUND", nil, 1);
frame.healthback:SetPoint("TOPLEFT", frame, "TOPLEFT", 1, -1);
frame.healthback:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -1, 1);
- frame.healthback:SetTexture("Interface\\RaidFrame\\Raid-Bar-Hp-Fill");
+ frame.healthback:SetTexture(barTexture);
frame.healthback:SetVertexColor(unpack(bgColor));
frame.health = frame:CreateTexture(nil, "BORDER");
frame.health:SetPoint("TOPLEFT", frame.healthback, "TOPLEFT");
frame.health:SetPoint("BOTTOMLEFT", frame.healthback, "BOTTOMLEFT");
- frame.health:SetTexture("Interface\\RaidFrame\\Raid-Bar-Hp-Fill");
+ frame.health:SetTexture(barTexture);
frame.health:SetVertexColor(unpack(healthColor));
frame.healthText = frame:CreateFontString(nil, "ARTWORK", "GameFontHighlight");
frame.healthText:SetPoint("RIGHT", frame.healthback, "RIGHT", -2, 0);
local GameTooltip_SetDefaultAnchor = nil;
local registerUnitEvents = OmaUFEvents.RegisterUnitEvents;
+local registerCastEvents = OmaUFCastBar.RegisterCastEvents;
+local unregisterCastEvents = OmaUFCastBar.UnregisterCastEvents;
local unitEvent = OmaUFEvents.UnitEvent;
local Settings = OmaUFSettings;
local attributes = {};
local inheritedFrames = "SecureUnitButtonTemplate,SecureHandlerStateTemplate";
+local barTexture = "Interface\\AddOns\\OmaRF\\images\\minimalist";
local function frameShow(frame)
frame:RegisterEvent("UNIT_ENTERED_VEHICLE");
frame:RegisterEvent("PLAYER_UPDATE_RESTING");
frame:RegisterEvent("PARTY_LEADER_CHANGED");
registerUnitEvents(frame);
+ registerCastEvents(frame.castbar);
unitEvent(frame, "UPDATE_ALL_BARS");
end
local function frameHide(frame)
frame:UnregisterAllEvents();
+ unregisterCastEvents(frame.castbar);
end
local function showTooltip(secure)
frame.healthback = frame:CreateTexture(nil, "BACKGROUND", nil, 1);
frame.healthback:SetPoint("TOPLEFT", frame, "TOPLEFT", 1, -1);
frame.healthback:SetPoint("BOTTOMRIGHT", frame, "RIGHT", -1, -5);
- frame.healthback:SetTexture("Interface\\RaidFrame\\Raid-Bar-Hp-Fill");
+ frame.healthback:SetTexture(barTexture);
frame.healthback:SetVertexColor(unpack(bgColor));
frame.health = frame:CreateTexture(nil, "BORDER");
frame.health:SetPoint("TOPLEFT", frame.healthback, "TOPLEFT");
frame.health:SetPoint("BOTTOMLEFT", frame.healthback, "BOTTOMLEFT");
- frame.health:SetTexture("Interface\\RaidFrame\\Raid-Bar-Hp-Fill");
+ frame.health:SetTexture(barTexture);
frame.health:SetVertexColor(unpack(healthColor));
frame.healthText = frame:CreateFontString(nil, "ARTWORK", "GameFontHighlightLarge");
- frame.healthText:SetPoint("RIGHT", frame.healthback, "RIGHT", -2, 0);
+ frame.healthText:SetPoint("RIGHT", frame.healthback, "RIGHT", -2, 1);
frame.manaback = frame:CreateTexture(nil, "BACKGROUND", nil, 1);
frame.manaback:SetPoint("TOPLEFT", frame, "LEFT", 1, -5);
frame.manaback:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -1, 1);
- frame.manaback:SetTexture("Interface\\RaidFrame\\Raid-Bar-Hp-Fill");
+ frame.manaback:SetTexture(barTexture);
frame.manaback:SetVertexColor(unpack(bgColor));
frame.mana = frame:CreateTexture(nil, "BORDER");
frame.mana:SetPoint("TOPLEFT", frame.manaback, "TOPLEFT");
frame.mana:SetPoint("BOTTOMLEFT", frame.manaback, "BOTTOMLEFT");
- frame.mana:SetTexture("Interface\\RaidFrame\\Raid-Bar-Hp-Fill");
+ frame.mana:SetTexture(barTexture);
frame.manaText = frame:CreateFontString(nil, "ARTWORK", "GameFontHighlight");
- frame.manaText:SetPoint("RIGHT", frame.manaback, "RIGHT", -2, 0);
+ frame.manaText:SetPoint("RIGHT", frame.manaback, "RIGHT", -2, 1);
frame.manaText:Hide();
frame.shield = frame:CreateTexture(nil, "BORDER");
frame.shield:SetPoint("TOPLEFT", frame.health, "TOPRIGHT");
frame.shield:SetPoint("BOTTOMLEFT", frame.health, "BOTTOMRIGHT");
- frame.shield:SetTexture("Interface\\RaidFrame\\Shield-Fill");
+ frame.shield:SetTexture(barTexture);
frame.shield:SetVertexColor(unpack(shieldColor));
frame.shield:Hide();
frame.shieldhl = frame:CreateTexture(nil, "ARTWORK");
frame.targeticon:SetHeight(18);
frame.targeticon:SetTexture("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcons");
frame.targeticon:Hide();
+ frame.castbar = OmaUFCastBar.CreateCastBar(frame, unit, 8);
-- set scripts
frame:SetScript("OnShow", frameShow);
frame:SetScript("OnHide", frameHide);
local GameTooltip_SetDefaultAnchor = nil;
local registerUnitEvents = OmaUFEvents.RegisterUnitEvents;
+local registerCastEvents = OmaUFCastBar.RegisterCastEvents;
+local unregisterCastEvents = OmaUFCastBar.UnregisterCastEvents;
local unitEvent = OmaUFEvents.UnitEvent;
local createAuraFrame = OmaUFAuras.CreateAuraFrame;
local attributes = {};
local inheritedFrames = "SecureUnitButtonTemplate,SecureHandlerStateTemplate";
+local barTexture = "Interface\\AddOns\\OmaRF\\images\\minimalist";
local function frameShow(frame)
frame:RegisterEvent("GROUP_ROSTER_UPDATE");
frame:RegisterEvent("PARTY_LEADER_CHANGED");
frame:RegisterUnitEvent("UNIT_LEVEL", frame.unit);
registerUnitEvents(frame);
+ registerCastEvents(frame.castbar);
unitEvent(frame, "UPDATE_ALL_BARS");
end
local function frameHide(frame)
frame:UnregisterAllEvents();
+ unregisterCastEvents(frame.castbar);
end
local function showTooltip(secure)
frame.healthback = frame:CreateTexture(nil, "BACKGROUND", nil, 1);
frame.healthback:SetPoint("TOPLEFT", frame, "TOPLEFT", 1, -1);
frame.healthback:SetPoint("BOTTOMRIGHT", frame, "RIGHT", -1, -5);
- frame.healthback:SetTexture("Interface\\RaidFrame\\Raid-Bar-Hp-Fill");
+ frame.healthback:SetTexture(barTexture);
frame.healthback:SetVertexColor(unpack(bgColor));
frame.health = frame:CreateTexture(nil, "BORDER");
frame.health:SetPoint("TOPLEFT", frame.healthback, "TOPLEFT");
frame.health:SetPoint("BOTTOMLEFT", frame.healthback, "BOTTOMLEFT");
- frame.health:SetTexture("Interface\\RaidFrame\\Raid-Bar-Hp-Fill");
+ frame.health:SetTexture(barTexture);
frame.health:SetVertexColor(unpack(healthColor));
frame.healthText = frame:CreateFontString(nil, "ARTWORK", "GameFontHighlightLarge");
- frame.healthText:SetPoint("RIGHT", frame.healthback, "RIGHT", -2, 0);
+ frame.healthText:SetPoint("RIGHT", frame.healthback, "RIGHT", -2, 1);
frame.manaback = frame:CreateTexture(nil, "BACKGROUND", nil, 1);
frame.manaback:SetPoint("TOPLEFT", frame, "LEFT", 1, -5);
frame.manaback:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -1, 1);
- frame.manaback:SetTexture("Interface\\RaidFrame\\Raid-Bar-Hp-Fill");
+ frame.manaback:SetTexture(barTexture);
frame.manaback:SetVertexColor(unpack(bgColor));
frame.mana = frame:CreateTexture(nil, "BORDER");
frame.mana:SetPoint("TOPLEFT", frame.manaback, "TOPLEFT");
frame.mana:SetPoint("BOTTOMLEFT", frame.manaback, "BOTTOMLEFT");
- frame.mana:SetTexture("Interface\\RaidFrame\\Raid-Bar-Hp-Fill");
+ frame.mana:SetTexture(barTexture);
frame.manaText = frame:CreateFontString(nil, "ARTWORK", "GameFontHighlight");
- frame.manaText:SetPoint("RIGHT", frame.manaback, "RIGHT", -2, 0);
+ frame.manaText:SetPoint("RIGHT", frame.manaback, "RIGHT", -2, 1);
frame.manaText:Hide();
frame.shield = frame:CreateTexture(nil, "BORDER");
frame.shield:SetPoint("TOPLEFT", frame.health, "TOPRIGHT");
frame.shield:SetPoint("BOTTOMLEFT", frame.health, "BOTTOMRIGHT");
- frame.shield:SetTexture("Interface\\RaidFrame\\Shield-Fill");
+ frame.shield:SetTexture(barTexture);
frame.shield:SetVertexColor(unpack(shieldColor));
frame.shield:Hide();
frame.shieldhl = frame:CreateTexture(nil, "ARTWORK");
frame.targeticon:SetHeight(18);
frame.targeticon:SetTexture("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcons");
frame.targeticon:Hide();
+ frame.castbar = OmaUFCastBar.CreateCastBar(frame, unit, 8);
+ createAuraFrame(frame, unit);
-- set scripts
frame:SetScript("OnShow", frameShow);
frame:SetScript("OnHide", frameHide);
secure:SetAttribute("*type1", "target");
secure:SetAttribute("*type2", "togglemenu");
secure:SetAttribute("toggleForVehicle", false);
- createAuraFrame(frame, unit);
RegisterUnitWatch(frame);
RegisterUnitWatch(secure);
return frame;
local pairs = pairs;
local InCombatLockdown = InCombatLockdown;
-local UnitFrames = CreateFrame("Frame", "OmaUnitFrames");
+local UnitFrames = CreateFrame("Frame", "OmaUnitFrames", UIParent);
local M = {};
OmaUnitFrames = M;
local function initialize()
- local player = M.InitializePlayer(UIParent);
+ UnitFrames:SetFrameStrata("LOW");
+ UnitFrames:SetPoint("CENTER");
+ UnitFrames:SetWidth(1);
+ UnitFrames:SetHeight(1);
+ local player = M.InitializePlayer(UnitFrames);
M.InitializePet(player);
- local target = M.InitializeTarget(UIParent);
+ local target = M.InitializeTarget(UnitFrames);
--M.InitializeToT(target); -- might not do this
- M.InitializeBoss(UIParent);
- -- TODO boss frames, (arena frames)
+ M.InitializeBoss(UnitFrames);
end
local hidden = false;
local frames = {PlayerFrame, TargetFrame, TargetFrameToT, PetFrame,
PlayerFrameAlternateManaBar, ComboFrame, PriestBarFrame, RuneFrame,
WarlockPowerFrame, MonkHarmonyBarFrame, PaladinPowerBarFrame,
- MageArcaneChargesFrame};
+ MageArcaneChargesFrame, CastingBarFrame, PetCastingBarFrame};
for i = 1,MAX_BOSS_FRAMES do
table.insert(frames, _G["Boss"..i.."TargetFrame"]);
table.insert(frames, _G["Boss"..i.."TargetFrameHealthBar"]);
frame:Hide();
end
- -- TODO create frames for class powers, currently using Simple Holy Power
- --for _, frame in pairs({PlayerFrameAlternateManaBar, ComboFrame,
- -- PriestBarFrame, RuneFrame, WarlockPowerFrame, MonkHarmonyBarFrame,
- -- PaladinPowerBarFrame, MageArcaneChargesFrame}) do
- -- frame:UnregisterAllEvents();
- -- frame:Hide();
- --end
-
-- from ShadowedUF, re-register vehicle events for default auras
PlayerFrame:RegisterEvent("PLAYER_ENTERING_WORLD");
PlayerFrame:RegisterEvent("UNIT_ENTERING_VEHICLE");