View Single Post
11-08-11, 11:23 AM   #24
Aanson
A Flamescale Wyrmkin
Join Date: Aug 2009
Posts: 124
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 View Post
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 MerchantFramepoint "CENTER"rpoint "CENTER"00scale 1},

local FM CreateFrame("Frame")
FM:RegisterEvent("PLAYER_LOGIN")

local _G _G

-- Frames to Move
local MoveFrameList 
= {
    [
"ExampleFrame"] = {parent nilpoint "CENTER"rpoint "CENTER"00scale 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_G[i]
        if 
f then
            p 
t.parent and _G[t.parent] or f:GetParent()
            
f:ClearAllPoints()
            
f:SetPoint(t.pointpt.rpointt.xt.y)
            
f:SetScale(t.scale)
            
f.SetPoint = function() end
        end
    end
end

FM
:SetScript("OnEvent", function()
    
FM.MoveAllFrames()
    
FM.HideAllFrames()
end
__________________
__________________
  Reply With Quote