Thread Tools Display Modes
12-13-09, 06:33 PM   #1
felixalias
A Defias Bandit
Join Date: Dec 2009
Posts: 2
Individually Spawned Party Frames

Hey,

I'm working on a layout for oUF and I'm using individually spawned partyN frames instead of a single header as I want the frames to grow upwards. However, for some reason, the frames don't always update when joining or leaving the group, for example, entering an arena, on occasion the frames won't match up to the actual players (duplicate frames for one player, clicking one frame targets a different party member etc).

This is the code I use for spawning the frames, and is the only place where I actually call oUF_spawn on the party frames.

Code:
local party = {}
party = oUF:Spawn('header', 'oUF_Party')
party[1] = oUF:Spawn("party1", "oUF_Party1")
party[1]:SetPoint('RIGHT', player, 'CENTER', 118, 75)
for i =2, 4 do
	party[i] = oUF:Spawn("party"..i, "oUF_Party"..i)
	party[i]:SetPoint("TOP", party[i-1], "BOTTOM", 0, 105)
end
I've searched all over the place for someone with a similar problem but i couldn't find anything, and the few other layouts that use individual frames spawned the frames very close to the above.
  Reply With Quote
12-14-09, 12:34 AM   #2
wurmfood
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 122
Something I see as a potential problem is these two lines:
Code:
party = oUF:Spawn('header', 'oUF_Party')
party[1] = oUF:Spawn("party1", "oUF_Party1")
The first line is fairly normal, but the second one is a little odd and may be the source of your issue.
  Reply With Quote
12-14-09, 01:33 AM   #3
felixalias
A Defias Bandit
Join Date: Dec 2009
Posts: 2
Is there another way to control the frames individually? Or to make the header grow upwards?
  Reply With Quote
12-14-09, 01:50 AM   #4
Freebaser
A Molten Kobold Bandit
 
Freebaser's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 135
Code:
party:SetAttribute(point, "BOTTOM")
  Reply With Quote
12-14-09, 02:10 AM   #5
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
What Freebaser said is enough to make the header spawn frames upwards. That being said; Frame spawning has nothing to do with how the frames are updated, only positioning. Your issue is most likely elsewhere.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
12-20-09, 04:16 PM   #6
btu10
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Jun 2009
Posts: 2
Hi,

Simple request for information about how to move/edit individual party frames. I'm very new to lua so i've just started with the basics.

I currently spawn my party frame(s) in the standard way using the group header format. I have a pretty simple style function (based on lily) with the styles applying to all frames with an if loop exception for sizing frames.

I would like to move and edit each party member frame separately if possible; where do I place this editing code and does anyone have an example of what it would look like?

Thanks in advance for any help
  Reply With Quote
12-20-09, 05:56 PM   #7
Freebaser
A Molten Kobold Bandit
 
Freebaser's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 135
you could use

Code:
if not unit then
...
which would be anything spawned as a header

or

Code:
if self:GetParent():GetName():match'oUF_Party' then
...
to specify a particular header
  Reply With Quote
12-21-09, 03:02 PM   #8
btu10
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Jun 2009
Posts: 2
Originally Posted by Freebaser View Post
you could use

Code:
if not unit then
...
which would be anything spawned as a header

or

Code:
if self:GetParent():GetName():match'oUF_Party' then
...
to specify a particular header
Correct me if i'm wrong but won't that pick up all of the party member frames collectively? I wanted to separate out the individual party members and move them around into a custom configuration.

Thanks for the information anyways
  Reply With Quote
12-23-09, 04:57 AM   #9
Nodd
A Murloc Raider
 
Nodd's Avatar
Join Date: Dec 2009
Posts: 7
You have to spawn party1, party2, party3 and party4. Then you can test unit=='party1' and so on.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Individually Spawned Party Frames


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