Go Back   WowAce Forums > Official Addon Threads > Unit Frames
Unit Frames ag_UnitFrames, Grid, Pitbull, X-Perl, etc., and modules

Reply
 
Thread Tools
Old 01-05-2008   #1
MoonWitch
Demonic Enforcer
 
Join Date: Nov 2007
Location: In the gutter
Posts: 2,141
Default Unofficial oUF - methods used for layouts

I was posting about oUF in the post screenshot thread, which means oUF related stuff doesn't really belong there. I thought having a thread like this might be helpful, though I've made it solely to discuss oUF and how lay-outs work, what lay-outs are out there etc.

I've remodelled oUF_lily to look a little more like what I wanted, the pvp flags aren't working yet - but they will. So far I've let the HP/MP stuff as it was, since I really like that approach. But I've added a level FontString to the deal, the positions of course are different now too.

I was wondering if it is possible to make the party frames different sizes, and I think it is. I would like to add raid frames to oUF as well, with a text frame to show which buffs are missing, but that might be out of the scope of oUF, for that part of my post, I would love some input.


The goal is the <PvP> in red before the name, the buffs go left, debuffs right.

For finished layouts for oUF you can go http://www.wowace.com/forums/index.php?topic=10834.0 This thread focusses on how to work with oUF to create layouts.
MoonWitch is offline   Reply With Quote
Old 01-05-2008   #2
Anolin
Full Member
 
Join Date: May 2006
Posts: 136
Default Re: Unofficial oUF - methods used for layouts

Where do you get oUF? I've heard that it's on a SVN or something but I cant ever find a working link.
Anolin is offline   Reply With Quote
Old 01-05-2008   #3
Seerah
Legendary Member
 
Seerah's Avatar
 
Join Date: May 2006
Posts: 6,156
Default Re: Unofficial oUF - methods used for layouts

http://code.google.com/p/wow-haste/
__________________
"ACE = Accidental Caps-Lock Error" -Dameek


Seerah is offline   Reply With Quote
Old 01-06-2008   #4
MoonWitch
Demonic Enforcer
 
Join Date: Nov 2007
Location: In the gutter
Posts: 2,141
Default Re: Unofficial oUF - methods used for layouts

Yeah, I didn't post the link because I wanted to give haste some time to see this thread first. But thank you Seerah. It's not an addon for the faint at heart, if you don't like oUF_lily, you'll be writing your own code. If that scares you, turn around and don't use oUF yet :P
MoonWitch is offline   Reply With Quote
Old 01-07-2008   #5
Tenelov
Junior Member
 
Join Date: Dec 2006
Posts: 79
Default Re: Unofficial oUF - methods used for layouts

To Coldfury:
You add this code in your layout
Code:
19	local GetNumPartyMembers = GetNumPartyMembers 
20	local GetNumRaidMembers = GetNumRaidMembers 
96	--~ local updateRaidicon = function(self, unit) 
97	--~   local index = GetRaidTargetIndex(unit) 
98	--~   local icon = self.RaidIcon 
99	 
100	--~   if(index) then 
101	--~     SetRaidTargetIconTexture(icon, index) 
102	--~     icon:Show() 
103	--~   else 
104	--~     icon:Hide() 
105	--~   end 
106	--~ end
But this code is in oUF/elements/ricons.lua.
To add it in layout.lua easier:
Code:
local icon = hp:CreateTexture(nil, "OVERLAY")
	icon:SetTexture"Interface\\TargetingFrame\\UI-RaidTargetingIcons"
	icon:SetWidth(18)
	icon:SetHeight(18)
	icon:SetPoint("TOP", hp, 0, 8)
	self.RaidIcon = icon
Tenelov is offline   Reply With Quote
Old 01-07-2008   #6
Tenelov
Junior Member
 
Join Date: Dec 2006
Posts: 79
Default Re: Unofficial oUF - methods used for layouts

My target's buff/debuff concept


Edit:
Now

But im cant cancel buff on right click mouse... Any idea?
Tenelov is offline   Reply With Quote
Old 01-07-2008   #7
lighterfluid
Hero Member
 
Join Date: Feb 2006
Posts: 604
Default Re: Unofficial oUF - methods used for layouts

Quote:
Originally Posted by Tenelov
To Coldfury:
[...code here...]
yeah i know it was already in elements but i tried something that didnt work, thats why code is commented out :P

but thanks i was wondering how to properly add RIcons
lighterfluid is offline   Reply With Quote
Old 01-07-2008   #8
lighterfluid
Hero Member
 
Join Date: Feb 2006
Posts: 604
Default Re: Unofficial oUF - methods used for layouts

Quote:
Originally Posted by Moon Witch
I was wondering if it is possible to make the party frames different sizes
change for party are made in the RegisterStyle function.
Code:
oUF:RegisterStyle("Coldy", setmetatable({
	point = "BOTTOM",
	sortDir = "UP",
	yOffset = 15,
	["initial-width"] = 200,
	["initial-height"] = 25,
}, {__call = func}))
point/sortDir/yOffset are for the party header.
point = the anchor in the header
sortDir = in which direction the party extand. Setting it to "UP" is like "Grow Upward".
yOffset = space between each party UF in the party header.

initial-width/height is pretty much self explanatory. its the width/height that party frames will have.

Im not sure how to change name/health.value/power.value position in there tho, i need some more explanation from haste :P
EDIT:thats how i modified the party looks
make sure you use :ClearAllPoint() before using SetPoint if ur not using the same anchor point.
Code:
local party = oUF:Spawn("party")
party:SetPoint("BOTTOM", -345, 150)
oUF_PartyUnitButton1.Name:SetPoint("TOPLEFT", oUF_PartyUnitButton1, "TOPLEFT", 2, 10)
oUF_PartyUnitButton1.Health.value:SetFontObject(GameFontNormalSmall)
oUF_PartyUnitButton2.Name:SetPoint("TOPLEFT", oUF_PartyUnitButton2, "TOPLEFT", 2, 10)
oUF_PartyUnitButton2.Health.value:SetFontObject(GameFontNormalSmall)
oUF_PartyUnitButton3.Name:SetPoint("TOPLEFT", oUF_PartyUnitButton3, "TOPLEFT", 2, 10)
oUF_PartyUnitButton3.Health.value:SetFontObject(GameFontNormalSmall)
oUF_PartyUnitButton4.Name:SetPoint("TOPLEFT", oUF_PartyUnitButton4, "TOPLEFT", 2, 10)
oUF_PartyUnitButton4.Health.value:SetFontObject(GameFontNormalSmall)
you still having trouble with pvp string moon?

ill be working on raid frames soon, just need to finish polishing the aggro coloring, and actually modify the layout, not only play in the code lol.
lighterfluid is offline   Reply With Quote
Old 01-07-2008   #9
lighterfluid
Hero Member
 
Join Date: Feb 2006
Posts: 604
Default Re: Unofficial oUF - methods used for layouts

Quote:
Originally Posted by Tenelov
But i cant cancel buff on right click mouse... Any idea?
mmm dont really know why but make sure you have "button:EnableMouse(true)" in the "createButton" function in aura.lua.
lighterfluid is offline   Reply With Quote
Old 01-07-2008   #10
MoonWitch
Demonic Enforcer
 
Join Date: Nov 2007
Location: In the gutter
Posts: 2,141
Default Re: Unofficial oUF - methods used for layouts

PvP string? Yep, lol. Haven't worked on it in a few days, I basically levelled up a little. I tried to get my buffs right. Buffs|UF|Debuffs but that didn't work out. The buffs keep on going to the right. Need to fix that.
MoonWitch is offline   Reply With Quote
Reply

Tags
ouf otravi unit frames


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 05:58 PM.