Thread Tools Display Modes
05-18-11, 03:17 PM   #1
dreamcatcher
A Black Drake
 
dreamcatcher's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2010
Posts: 82
Question Move Bags? Help!

I can get the bags to show on the left like i want, but they open on top of one another. How can I get them to open like they do in default?



[code]function updateContainerFrameAnchors()
for i=1, 5 do
local frame = _G["ContainerFrame"..i]
frame:ClearAllPoints();
frame:SetPoint("LEFT",UIParent,"LEFT",0,0);
end
end

  Reply With Quote
05-18-11, 07:21 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Well, your script is placing all five of them in the same location.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
05-18-11, 07:42 PM   #3
Nobgul
A Molten Giant
 
Nobgul's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 693
I am not great with setpoints but as Seerah said all the bags are being placed in the same spot. You can either Set them seperatly or you could write a bit more complicated code that would allow you to move them and save the position.

You could also use MoveAnything to just move the bags, it will remember the position of the bags at each login.
__________________
[SIGPIC][/SIGPIC]
  Reply With Quote
05-19-11, 04:15 AM   #4
dreamcatcher
A Black Drake
 
dreamcatcher's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2010
Posts: 82
for i=1, 1 do
local frame = _G["ContainerFrame"..i]
frame:ClearAllPoints();
frame:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", -50, 300);
end
I was able to move them left or right but they will not move up or down.
  Reply With Quote
05-19-11, 08:19 AM   #5
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
This will anchor the frames one atop the other without discrimination, so some may actually be anchored offscreen - it's a step in the direction you want to go in, though, so do with it what you will.

Code:
local frames = {}

for index = 1, _G.NUM_CONTAINER_FRAMES do
    local frame = _G["ContainerFrame" .. index]
    frame:ClearAllPoints();

    frames[index] = frame

    if index == 1 then
        frame:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", -50, 300)
    else
        frame:SetPoint("BOTTOMRIGHT", frames[index - 1], "TOPRIGHT", 0, 0)
    end
end
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Move Bags? Help!


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off