WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Search/Requests (https://www.wowinterface.com/forums/forumdisplay.php?f=6)
-   -   Looking for a DefaultUI Mover (https://www.wowinterface.com/forums/showthread.php?t=39594)

Nibelheim 04-11-11 03:11 PM

Quote:

Originally Posted by Zagrei (Post 234320)
This seems really interesting! I have one question: Has the download link been updated with the changes/bugs mentioned in this thread, or do they still need to be applied?

I think I updated the download link.

Lily.Petal 04-11-11 03:45 PM

Noted something when I hid the UIErrors, it also hides quest updates as well :o

Nibelheim 04-11-11 03:59 PM

Quote:

Originally Posted by Lily.Petal (Post 234347)
Noted something when I hid the UIErrors, it also hides quest updates as well :o

Yep, quest updates also use that frame. Best to simply filter out error messages. A decent addon would be xanErrorDevourer.

Aanson 11-08-11 11:23 AM

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:

Quote:

Originally Posted by Nibelheim (Post 246930)
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


Nibelheim 11-08-11 11:25 AM

lua Code:
  1. local FM = CreateFrame("Frame")
  2. FM:RegisterEvent("PLAYER_LOGIN")
  3.  
  4. local _G = _G
  5.  
  6. -- Frames to Move
  7. local MoveFrameList = {
  8.     ["MacaroonBars38"] = {parent = MerchantFrame, point = "CENTER", rpoint = "CENTER", x = 0, y = 0, scale = 1},
  9. }
  10.  
  11. -- Frames to Hide
  12. local HideFrameList = {
  13.     "ExampleFrame",
  14.    
  15. }
  16.  
  17. -- Functions
  18. FM.HideAllFrames = function()
  19.     for i,v in pairs(HideFrameList) do
  20.         local f = _G[v]
  21.         if f then
  22.             f:UnregisterAllEvents()
  23.             f:Hide()    
  24.             f.Show = function() end
  25.         end
  26.     end
  27. end
  28.  
  29. FM.MoveAllFrames = function()
  30.     for i,v in pairs(MoveFrameList) do
  31.         local t = MoveFrameList[i]
  32.         local f, p = _G[i]
  33.         if f then
  34.             p = t.parent and _G[t.parent] or f:GetParent()
  35.             f:ClearAllPoints()
  36.             f:SetPoint(t.point, p, t.rpoint, t.x, t.y)
  37.             f:SetScale(t.scale)
  38.             f.SetPoint = function() end
  39.         end
  40.     end
  41. end
  42.  
  43. FM:SetScript("OnEvent", function()
  44.     FM.MoveAllFrames()
  45.     FM.HideAllFrames()
  46. end)

Aanson 11-08-11 05:07 PM

I copy and pastied your below code into the .lua (replacing all the previous code), but other than rendering the button inactive and moving the button to the centre of the screen, it didn't do anything else.

It appears as soon as log on too. I'm hoping to get it to only show when I pull up a merchant frame, but like I say, it shows 100% alpha all the time.

I'm going to try and add all of the frames belonging to the bar to the code and maybe that'll do it. I was hoping that the button and it's frame and shine would be pre attatched to the bar handler by macaroon, but using this addon appeared to 'detatch' the button from the frame.

Wish me luck!!! I need it!!

EDIT: The second I posted this, I realised that I didn't thank you for taking the time to try and solve my problem. Thanks!! I'm sure I'll get there eventually, I normally do!

Nibelheim 11-08-11 05:47 PM

Woops, saw you didn't put quotes around the parent frame.

lua Code:
  1. local FM = CreateFrame("Frame")
  2. FM:RegisterEvent("PLAYER_LOGIN")
  3.  
  4. local _G = _G
  5.  
  6. -- Frames to Move
  7. local MoveFrameList = {
  8.     ["MacaroonBars38"] = {parent = "MerchantFrame", point = "CENTER", rpoint = "CENTER", x = 0, y = 0, scale = 1},
  9. }
  10.  
  11. -- Frames to Hide
  12. local HideFrameList = {
  13.     "ExampleFrame",
  14.    
  15. }
  16.  
  17. -- Functions
  18. FM.HideAllFrames = function()
  19.     for i,v in pairs(HideFrameList) do
  20.         local f = _G[v]
  21.         if f then
  22.             f:UnregisterAllEvents()
  23.             f:Hide()    
  24.             f.Show = function() end
  25.         end
  26.     end
  27. end
  28.  
  29. FM.MoveAllFrames = function()
  30.     for i,v in pairs(MoveFrameList) do
  31.         local t = MoveFrameList[i]
  32.         local f, p = _G[i]
  33.         if f then
  34.             p = t.parent and _G[t.parent] or f:GetParent()
  35.             f:ClearAllPoints()
  36.             f:SetPoint(t.point, p, t.rpoint, t.x, t.y)
  37.             f:SetScale(t.scale)
  38.             f.SetPoint = function() end
  39.         end
  40.     end
  41. end
  42.  
  43. FM:SetScript("OnEvent", function()
  44.     FM.MoveAllFrames()
  45.     FM.HideAllFrames()
  46. end)


All times are GMT -6. The time now is 11:55 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI