Thread Tools Display Modes
01-08-09, 09:38 PM   #441
Alkar
A Chromatic Dragonspawn
 
Alkar's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 195
Got a question i have party targets and they are hooked to my party frames but they go up and down and i need them straight acrossed..

would it be somethign the same as i did on the party frames with:

Code:
party:SetManyAttributes(
	"showParty", true,   
	"showRaid", false,   
	"columnSpacing", 10,   
	"unitsPerColumn", 1,   
	"maxColumns", 4,   
	"columnAnchorPoint", "LEFT",   
	"xOffset", 20   
)
but of course partytargets:setmanyattributes(blah blah)
This is the code as it stands
Code:
local partytarget = {}
for i = 1, 5 do
	partytarget[i] = oUF:Spawn('party'..i..'target', 'oUF_Party'..i..'Target')
	if i == 1 then
		partytarget[i]:SetPoint('TOPLEFT', party, 'TOPRIGHT', 5, 0)
	else
		partytarget[i]:SetPoint('TOP', partytarget[i-1], 'BOTTOM', 0, -20)
	end
end
my party is like this...

12345 and party targets are going like
1
2
3
4
5


but need them like this:
12345
12345
__________________

Last edited by Alkar : 01-08-09 at 10:51 PM.
 
01-09-09, 01:58 AM   #442
Bruners
A Flamescale Wyrmkin
 
Bruners's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 125
It looks like you have mixed the code a bit. If there is 1 partytarget you place the TOP point of it at the BOTTOM of the party frame. For the remaining partytargets you place the targets TOPLEFT point on the TOPRIGHT point of the previous party target.

Anyway i think this will help you, if not look at http://www.wowwiki.com/API_Region_SetPoint

Code:
local partytarget = {}
for i = 1, 4 do
	partytarget[i] = oUF:Spawn('party'..i..'target', 'oUF_Party'..i..'Target')
	if i == 1 then
		partytarget[i]:SetPoint('TOP', party, 'BOTTOM', 5, 0)
	else
		partytarget[i]:SetPoint('TOPLEFT', partytarget[i-1], 'TOPRIGHT', 0, 5)
	end
end
Also, there is only 4 party members not 5.

think you can also do it like this

Code:
local partytarget = {}
for i = 1, 4 do
	partytarget[i] = oUF:Spawn('party'..i..'target', 'oUF_Party'..i..'Target')
	partytarget[i]:SetPoint("TOPLEFT", _G["oUF_PartyUnitButton"..i], "BOTTOMLEFT", 0, 0)
end

Last edited by Bruners : 01-09-09 at 02:05 AM.
 
01-09-09, 07:28 AM   #443
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Originally Posted by Alkar View Post
Got a question i have party targets and they are hooked to my party frames but they go up and down and i need them straight acrossed..

would it be somethign the same as i did on the party frames with:

Code:
party:SetManyAttributes(
	"showParty", true,   
	"showRaid", false,   
	"columnSpacing", 10,   
	"unitsPerColumn", 1,   
	"maxColumns", 4,   
	"columnAnchorPoint", "LEFT",   
	"xOffset", 20   
)
but of course partytargets:setmanyattributes(blah blah)
This is the code as it stands
Code:
local partytarget = {}
for i = 1, 5 do
	partytarget[i] = oUF:Spawn('party'..i..'target', 'oUF_Party'..i..'Target')
	if i == 1 then
		partytarget[i]:SetPoint('TOPLEFT', party, 'TOPRIGHT', 5, 0)
	else
		partytarget[i]:SetPoint('TOP', partytarget[i-1], 'BOTTOM', 0, -20)
	end
end
my party is like this...

12345 and party targets are going like
1
2
3
4
5


but need them like this:
12345
12345
Originally Posted by Bruners View Post
It looks like you have mixed the code a bit. If there is 1 partytarget you place the TOP point of it at the BOTTOM of the party frame. For the remaining partytargets you place the targets TOPLEFT point on the TOPRIGHT point of the previous party target.

Anyway i think this will help you, if not look at http://www.wowwiki.com/API_Region_SetPoint

Code:
local partytarget = {}
for i = 1, 4 do
	partytarget[i] = oUF:Spawn('party'..i..'target', 'oUF_Party'..i..'Target')
	if i == 1 then
		partytarget[i]:SetPoint('TOP', party, 'BOTTOM', 5, 0)
	else
		partytarget[i]:SetPoint('TOPLEFT', partytarget[i-1], 'TOPRIGHT', 0, 5)
	end
end
Also, there is only 4 party members not 5.

think you can also do it like this

Code:
local partytarget = {}
for i = 1, 4 do
	partytarget[i] = oUF:Spawn('party'..i..'target', 'oUF_Party'..i..'Target')
	partytarget[i]:SetPoint("TOPLEFT", _G["oUF_PartyUnitButton"..i], "BOTTOMLEFT", 0, 0)
end
To the both of you: Why not use the XML template posted about several times now? It simplifies the whole partyXtarget and partypetX creation to a single header.
 
01-09-09, 08:33 AM   #444
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by Dimpf View Post
I'm using a modified version of oUF_Perfect (so just raid frames, no party/target/player frames) along with the default unit frames, and I'm looking for a way to prevent the party frames from being hidden by oUF.

It appears the frames are being hidden by something in here, but I'm not familiar with the API well enough to say:

Code:
local raid = {}
for i = 1, 5 do
	local raidGroup = oUF:Spawn('header', 'oUF_Raid' .. i)
	raidGroup:SetManyAttributes('groupFilter', tostring(i), 'showRaid', true, 'xOffSet', 5, 'point', 'LEFT')
	table.insert(raid, raidGroup)
	if i == 1 then
		raidGroup:SetManyAttributes('showParty', true, 'showPlayer', true)
		raidGroup:SetPoint('BOTTOMRIGHT', UIParent, 'BOTTOMRIGHT', -5, 5)
	else
		raidGroup:SetPoint('BOTTOMRIGHT', raid[i - 1], 'TOPRIGHT', 0, 5)
	end
	raidGroup:Show()
end
I've narrowed it down some, but if someone has had experience with this, I'd appreciate a push in the right direction (showParty? /boggle).
Originally Posted by Dimpf View Post
Yeah, I'm aware of that. I'm fine with it displaying both, but I want to squelch the hiding of the default party frames.

As of yet, I haven't found (or written) any frames that are superior to the default player/target/party frames for PvP, so until I find a replacement, I would rather not have them disabled).

oUF is very snappy (especially compared to the lumbering behemoths that PitBull/Xperl are), so I plan to write a layout to my liking, but until that happens...
oUF:Spawn works in that way that if you spawn a frame it will hide the original one.

Example: If you spawn player the blizzard player frame hides. If you spawn a party, the blizzard party hides.
This does not apply to raid frames though, because blizzard has a whole different system for it.
 
01-09-09, 08:35 AM   #445
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by haste View Post
To the both of you: Why not use the XML template posted about several times now? It simplifies the whole partyXtarget and partypetX creation to a single header.
They dont know how it works (heck, in the latest versions even I am unsure).
Why not show an example?
 
01-09-09, 08:43 AM   #446
Bruners
A Flamescale Wyrmkin
 
Bruners's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 125
what p3lim said, and partypets works perfectly the way i currently do it.
So far i haven't seen any layouts doing it any other way.
 
01-09-09, 08:45 AM   #447
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by Bruners View Post
what p3lim said, and partypets works perfectly the way i currently do it.
So far i haven't seen any layouts doing it any other way.
I had *target as own frames in oUF Perfect, but I found out that I didnt need it and went for simple tags instead.
 
01-09-09, 08:50 AM   #448
Alkar
A Chromatic Dragonspawn
 
Alkar's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 195
Originally Posted by p3lim View Post
They dont know how it works (heck, in the latest versions even I am unsure).
Why not show an example?
Yeah im just not sure at all how it works. Sorry Haste im so new to this i just can't figure it out and nobody i have seen uses it that way so i can't figure it out by looking at the code.
__________________
 
01-09-09, 10:28 AM   #449
Dimpf
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Jan 2009
Posts: 25
Originally Posted by p3lim View Post
oUF:Spawn works in that way that if you spawn a frame it will hide the original one.

Example: If you spawn player the blizzard player frame hides. If you spawn a party, the blizzard party hides.
This does not apply to raid frames though, because blizzard has a whole different system for it.
Makes sense. Is there a way to change oUF_Perfect (or my above modified code) to only create raid frames, and not work as party frames?
 
01-09-09, 10:32 AM   #450
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by Dimpf View Post
Makes sense. Is there a way to change oUF_Perfect (or my above modified code) to only create raid frames, and not work as party frames?
change the attribute 'showParty' to false
 
01-09-09, 10:33 AM   #451
Dimpf
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Jan 2009
Posts: 25
Originally Posted by p3lim View Post
change the attribute 'showParty' to false
Oh, nice. /noob
 
01-09-09, 11:47 AM   #452
Penthouse36
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Feb 2008
Posts: 4
Originally Posted by Alkar View Post
Yeah im just not sure at all how it works. Sorry Haste im so new to this i just can't figure it out and nobody i have seen uses it that way so i can't figure it out by looking at the code.

I've attached my layout. It creates partytargets, partypets and raidpets the way * i think * Haste intends, using xml templates...

I thought it might help folks...
Attached Files
File Type: zip oUF_Last-v1.0.zip (11.4 KB, 580 views)
 
01-09-09, 11:59 AM   #453
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by Penthouse36 View Post
I've attached my layout. It creates partytargets, partypets and raidpets the way * i think * Haste intends, using xml templates...

I thought it might help folks...
It havent changed much I can see, but i would make the templates different

Basically, using the example template haste has made in oUF.xml i would do like this:

Code:
local function CreateLayout(self, unit)
	if(self:GetAttribute('unitsuffix') == 'target') then
		-- do stuff for unittarget here
	else
		-- do stuff for other frames here
	end
end

oUF:RegisterStyle('test', CreateLayout)
oUF:SetActiveStyle('test')

local raid = oUF:Spawn('header', 'oUF_Test', 'oUF_HeaderTargetTemplate')
raid:SetPoint('CENTER', UIParent)
raid:SetManyAttributes('showRaid', true, etc, etc, etc, etc)

Last edited by p3lim : 01-09-09 at 12:08 PM.
 
01-09-09, 03:31 PM   #454
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Originally Posted by p3lim View Post
It havent changed much I can see, but i would make the templates different

Basically, using the example template haste has made in oUF.xml i would do like this:

Code:
local function CreateLayout(self, unit)
	if(self:GetAttribute('unitsuffix') == 'target') then
		-- do stuff for unittarget here
	else
		-- do stuff for other frames here
	end
end

oUF:RegisterStyle('test', CreateLayout)
oUF:SetActiveStyle('test')

local raid = oUF:Spawn('header', 'oUF_Test', 'oUF_HeaderTargetTemplate')
raid:SetPoint('CENTER', UIParent)
raid:SetManyAttributes('showRaid', true, etc, etc, etc, etc)
We've already discussed this. The third argument is for custom header templates, not custom unit templates. Also using the example defined in oUF isn't really recommended.
 
01-09-09, 09:48 PM   #455
Dimpf
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Jan 2009
Posts: 25
Originally Posted by p3lim View Post
change the attribute 'showParty' to false
Well, that didn't do quite what I was hoping for. I was hoping it would stop hiding my default party frames, but that didn't happen.

Is there a way to write an oUF raid layout such that it does not despawn my blizzard party frames? I'm currently working off a heavily modified version of oUF_Perfect, which has worked pretty well so far, except for that one 'feature'.
 
01-09-09, 10:45 PM   #456
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Code:
oUF:Spawn('header', 'oUF_LayoutRaid', nil, '')
The last argument is what oUF uses to disable blizzard frames on headers. It defaults to 'party' when it isn't set.
 
01-10-09, 02:41 PM   #457
Freebaser
A Molten Kobold Bandit
 
Freebaser's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 135
Im getting an error when the pet frame despawns.

Code:
Interface\AddOns\oUF\ouf.lua:440: bad argument #1 to 'select' (index out of range)
Here is my color gradient code

Code:
local x,y,z = oUF.ColorGradient(min/max, .68,.68,.68, .25,.35,.43, .25,.25,.25)
bar:SetStatusBarColor(x,y,z)
Should I be doing something different?
 
01-10-09, 03:15 PM   #458
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Your most likely dividing by zero or something.
 
01-10-09, 03:43 PM   #459
Bruners
A Flamescale Wyrmkin
 
Bruners's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 125
Ok, i finally understood the XML-template case, i was clearly thinking to much :P
But, how do control the look for partypets and partytarget?

my old "if (unit and substr(unit, 0, 8) == "partypet") then" is not working
as in how do i remove the power bar for partypets

Last edited by Bruners : 01-10-09 at 03:55 PM.
 
01-10-09, 05:19 PM   #460
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by Bruners View Post
Ok, i finally understood the XML-template case, i was clearly thinking to much :P
But, how do control the look for partypets and partytarget?

my old "if (unit and substr(unit, 0, 8) == "partypet") then" is not working
as in how do i remove the power bar for partypets
use the GetAttribute function and filter for the attributes used in the template
 

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF - Layout discussion


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