Hey Nib, Lily
Thanks for the help so far. I've posted a response on that topic that I'd started, but i thought that i should stick it here too seeing as this is the post that Lily referred me to:
Originally Posted by Nibelheim
Link
Just insert your frames at the top of Core.lua, you'll find it.
|
I'm not sure if I've done what you suggested correctly. I'd downloaded your addon, bumped the .toc and added the bit of code to the top like you said. I logged on but it didn't seem to change anything.
I'm pretty sure that there's a HUGE chance that I've either put it in the wrong place or done something else wrong!!!
Please help moi!!
PHP Code:
local MoveFrameList = {
["MacaroonBars38"] = {parent = MerchantFrame, point = "CENTER", rpoint = "CENTER", x = 0, y = 0, scale = 1},
local FM = CreateFrame("Frame")
FM:RegisterEvent("PLAYER_LOGIN")
local _G = _G
-- Frames to Move
local MoveFrameList = {
["ExampleFrame"] = {parent = nil, point = "CENTER", rpoint = "CENTER", x = 0, y = 0, scale = 1},
}
-- Frames to Hide
local HideFrameList = {
"ExampleFrame",
}
-- Functions
FM.HideAllFrames = function()
for i,v in pairs(HideFrameList) do
local f = _G[v]
if f then
f:UnregisterAllEvents()
f:Hide()
f.Show = function() end
end
end
end
FM.MoveAllFrames = function()
for i,v in pairs(MoveFrameList) do
local t = MoveFrameList[i]
local f, p = _G[i]
if f then
p = t.parent and _G[t.parent] or f:GetParent()
f:ClearAllPoints()
f:SetPoint(t.point, p, t.rpoint, t.x, t.y)
f:SetScale(t.scale)
f.SetPoint = function() end
end
end
end
FM:SetScript("OnEvent", function()
FM.MoveAllFrames()
FM.HideAllFrames()
end)