local _;
local pairs = pairs;
local InCombatLockdown = InCombatLockdown;
+local CTimerAfter = C_Timer.After;
-local UnitFrames = CreateFrame("Frame", "OmaUnitFrames");
+local updateAuraTooltips = OmaUFAuras.UpdateAuraTooltips;
+
+local UnitFrames = CreateFrame("Frame", "OmaUnitFrame", 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"]);
- table.insert(frames, _G["Boss"..i.."TargetFrameManaBar"]);
+ --table.insert(frames, _G["Boss"..i.."TargetFrame"]);
+ --table.insert(frames, _G["Boss"..i.."TargetFrameHealthBar"]);
+ --table.insert(frames, _G["Boss"..i.."TargetFrameManaBar"]);
end
for _, frame in pairs(frames) do
frame:UnregisterAllEvents();
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");
end
end
+local function updateTooltipFuncs()
+ -- let MoveAnything hook these to anchor tooltip elsewhere
+ M.UpdatePlayerTooltips();
+ M.UpdatePetTooltips();
+ M.UpdateTargetTooltips();
+ M.UpdateBossTooltips();
+ updateAuraTooltips();
+end
+
UnitFrames:RegisterEvent("PLAYER_LOGIN");
+UnitFrames:RegisterEvent("PLAYER_ENTERING_WORLD");
UnitFrames:RegisterEvent("ADDON_LOADED");
UnitFrames:SetScript("OnEvent", function(self, event, addon)
- if event == "PLAYER_LOGIN" then
+ if event == "PLAYER_ENTERING_WORLD" then
+ CTimerAfter(0.01, updateTooltipFuncs);
+ elseif event == "ADDON_LOADED" and addon == "Blizzard_ArenaUI" then
+ hideArenaFrames();
+ elseif event == "PLAYER_LOGIN" then
OmaUFLoadChar();
hideBlizzardFrames();
initialize();
- elseif event == "ADDON_LOADED" and addon == "Blizzard_ArenaUI" then
- hideArenaFrames();
end
end);