Thread Tools Display Modes
03-14-09, 04:04 PM   #881
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
Join Date: May 2006
Posts: 281
Originally Posted by Alkar View Post
use an xml template there is plenty about this on about page 27-30 and they were all questions ask by me about it and answers givin by haste and p3lim
And about the same subject, no one seems to be able to give me a clear answer if it's possible to spawn NON child frames through a custom template.
Child frames like party pets, party targets, maintank targets are easy, but how about spawning a raid the same way, is that possible ? Lyn says yes, other ppls say no...

So, Haste, is it possible, and if so, how/where can i find an example please ?
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
 
03-14-09, 04:37 PM   #882
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
The units which you spawn via the XML template work by using the "useparent-unit" attribute. This attribute makes the header combine the unit of the parent (ie. party1) with the unitsuffix attribute (ie. pet), which gives you partypet1 (due to the fact that the header makes this change on the unit).

This means that you can't spawn those units through the header, without having them as childs on parent.

There really are only two solutions around this:
1) Spawn the units separate, like single units.
2) Re-implement the header through the restricted environment to allow such behavior.

The second solution is pretty theoretical only atm, but it might be something that will be added to oUF if it's feasible. Right now there has only been some discussions around it, and no real proof of concept.
 
03-14-09, 05:39 PM   #883
demitri
A Fallenroot Satyr
Join Date: Jul 2008
Posts: 20
this is givin me a headache..

i just want to anchor the party pets to the persons they belong to.. .. im so lost now on how to pin them properly wit xlm.. here is wot i have..

Code:
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/../FrameXML/UI.xsd">
	<Button name="oUF_Playerpets" inherits="SecureUnitButtonTemplate" hidden="true" virtual="true">
		<Frames>
			<Button name="$parentPet" inherits="SecureUnitButtonTemplate">
				<Anchors>
					<Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT" relativeTo="$parent">
						<Offset>
							<AbsDimension x="5" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Attributes>
					<Attribute name="unitsuffix" type="string" value="pet"/>
					<Attribute name="useparent-unit" type="boolean" value="true"/>
					<Attribute name="type1" type="string" value="target"/>
					<Attribute name="initial-unitWatch" type="boolean" value="true"/>
				</Attributes>
			</Button>
		</Frames>
	</Button>
</Ui>
and my spawn code is..

Code:
local party	= oUF:Spawn("header", "oUF_Party")
party:SetManyAttributes("showParty", true, "yOffset", -20)
party:SetPoint("LEFT", 20, -140)
party:Show()
party:SetAttribute("template", "oUF_PlayerPets")
but nothing is spawned

Code:
local partypet = {}
partypet[1] = oUF:Spawn("template", "oUF_PlayerPets")
partypet[1]:SetPoint('BOTTOMRIGHT', party, 'BOTTOMRIGHT', 0, -16)
for i =2, 4 do
	partypet[i] = oUF:Spawn('partypet'..i, 'oUF_PartyPet'..i)
	partypet[i]:SetPoint('BOTTOM', partypet[i-1], 'BOTTOM', 0, 90)
end
can i use the above?

Last edited by demitri : 03-14-09 at 05:51 PM.
 
03-14-09, 05:53 PM   #884
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
You need to set the attribute before you show the header.
 
03-14-09, 06:44 PM   #885
demitri
A Fallenroot Satyr
Join Date: Jul 2008
Posts: 20
so...

Code:
local party = oUF:Spawn("header", "oUF_Party")
party:SetAttribute("template", "oUF_PlayerPets")
party:SetManyAttributes("showParty", true, "yOffset", -20)
party:SetPoint("LEFT", 20, -140)
party:Show()
?? or am i wrong again

what am i doin wronggg

Last edited by demitri : 03-14-09 at 06:47 PM.
 
03-14-09, 07:07 PM   #886
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Your template is called 'oUF_Playerpets', while you refer to 'oUF_PlayerPets' in your code. Other than that is looks correct.
 
03-15-09, 01:16 AM   #887
demitri
A Fallenroot Satyr
Join Date: Jul 2008
Posts: 20
but the pets arent spawning.
 
03-15-09, 01:24 AM   #888
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
Join Date: May 2006
Posts: 281
Originally Posted by demitri View Post
so...

Code:
local party = oUF:Spawn("header", "oUF_Party")
party:SetAttribute("template", "oUF_PlayerPets")
party:SetManyAttributes("showParty", true, "yOffset", -20)
party:SetPoint("LEFT", 20, -140)
party:Show()
?? or am i wrong again

what am i doin wronggg
In your xml you have
Code:
<Button name="oUF_Playerpets"
Yet in your layout you have
Code:
party:SetAttribute("template", "oUF_PlayerPets")
xml = pets, layout = Pets, it's case sensitive, both have to be the same. On a sidenote, it's not player's pet, it's party pets
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }

Last edited by Caellian : 03-15-09 at 01:26 AM.
 
03-15-09, 01:55 AM   #889
demitri
A Fallenroot Satyr
Join Date: Jul 2008
Posts: 20
ok i got it to spawn.. my queston is now... how do it .. resize the party petframe from the xml or something?
 
03-15-09, 02:22 AM   #890
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
Join Date: May 2006
Posts: 281
Originally Posted by demitri View Post
ok i got it to spawn.. my queston is now... how do it .. resize the party petframe from the xml or something?
No, in the layout, set its attributes.
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
 
03-15-09, 02:31 AM   #891
demitri
A Fallenroot Satyr
Join Date: Jul 2008
Posts: 20
Originally Posted by Caellian View Post
No, in the layout, set its attributes.
Code:
local party	= oUF:Spawn("header", "oUF_Party")
party:SetManyAttributes("showParty", true, "yOffset", -20)
party:SetPoint("LEFT", 20, -140)
party:SetAttribute('template', 'oUF_AsymPets')
where?
 
03-15-09, 02:45 AM   #892
Rostok
A Flamescale Wyrmkin
Join Date: Jul 2008
Posts: 127
Code:
if(self:GetAttribute('unitsuffix') == 'pet') then
	self:SetAttribute('initial-height', 12)
	self:SetAttribute('initial-width', 70)
	self.Portrait:SetAlpha(0)
	self.Power:SetHeight(2)
	self.Health:SetHeight(10)
	self.Health.Text:Hide()
	self.Power.Text:Hide()
	self.Info:SetPoint('LEFT', self.Health, 2, 1)
end
Something like that.
 
03-15-09, 02:47 AM   #893
Freebaser
A Molten Kobold Bandit
 
Freebaser's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 135
Originally Posted by demitri View Post
Code:
local party	= oUF:Spawn("header", "oUF_Party")
party:SetManyAttributes("showParty", true, "yOffset", -20)
party:SetPoint("LEFT", 20, -140)
party:SetAttribute('template', 'oUF_AsymPets')
where?
self:GetAttribute('unitsuffix') == 'pet'

is use to define pet attributes

You can look at my oUF_Mastiff layout as an example.

http://freebaser.net/cgit/oUF_Mastif...d62794f36b4d9e

EDIT: or what Rostok posted =)
 
03-15-09, 03:25 AM   #894
demitri
A Fallenroot Satyr
Join Date: Jul 2008
Posts: 20
thanks so much for ur help guys... its workin perfect!
 
03-15-09, 03:37 AM   #895
demitri
A Fallenroot Satyr
Join Date: Jul 2008
Posts: 20
new question now... indicators ....

how would i go about this? Tags?
 
03-15-09, 04:01 AM   #896
Rostok
A Flamescale Wyrmkin
Join Date: Jul 2008
Posts: 127
You should take a look at oUF_Freebgrid.

It uses a lot of indicators with tags and such, very instructive layout.
 
03-15-09, 09:01 AM   #897
demitri
A Fallenroot Satyr
Join Date: Jul 2008
Posts: 20
thanks again for a point in the right direction

sweet... got everyting workin perfect now!

Last edited by demitri : 03-15-09 at 11:10 AM.
 
03-15-09, 03:02 PM   #898
nidraj
A Deviate Faerie Dragon
Join Date: Dec 2008
Posts: 10
hi ,

I'm workin on oUF_p3lim, and I have one worries, I do not find means to show the Pvp symbol..

i have try a lot of combination on foundation of :

Code:
self.PvP = self.Health:CreateTexture(self:GetName().."PVPIcon", "OVERLAY", self)
if somebody have a idea, thank you =)
 
03-15-09, 06:24 PM   #899
PProvost
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 13
Originally Posted by nidraj View Post
hi ,

I'm workin on oUF_p3lim, and I have one worries, I do not find means to show the Pvp symbol..

i have try a lot of combination on foundation of :

Code:
self.PvP = self.Health:CreateTexture(self:GetName().."PVPIcon", "OVERLAY", self)
if somebody have a idea, thank you =)
I'll bet you're missing the height/width and/or the positioning.

Code:
self.PvP = self.Health:CreateTexture(nil, "OVERLAY")
self.PvP:SetHeight(12)
self.PvP:SetWidth(12)
self.PvP:SetPoint("CENTER")
Then move on from there.
 
03-16-09, 03:38 AM   #900
Jabar
Premium Member
 
Jabar's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Jan 2008
Posts: 8
Hi,

I have a rather stupid question concerning my layout :
What filter(s) should I apply to my Debuffs in order to only show those curable by me ?
I can't figure it out, thanks for your help !
 

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