That's funny, considering I figured it out in 30 seconds.
Well I suck then, but I still got it working :p
Quote from Moon Witch »
Could one of you be kind enough to tell me how this works?
self.Health:SetWidth(unit and 200 or 100)
What's with the unit and part?
Party, Partypet, Raid (any group UF really) are headers, not units, and that line will use 100 as width for party/raid/partypet and 200 for the rest(player, target, focus etc).
Im gonna find a diffrent approach than using string.match
Maybe like a function for every unitgroup like player, target, tot, raid and functions for common tasks which are done to several units (like adding a portrait or setting up auras for the frame) .. and call those worker functions from the unitframe function :9
I think tapeworm functions with many conditionals to fit everything in one huge function is bad style .9
give cred for this, used many hours looking through lua files finding it
This is quite weird, i've replaced mine with yours but it behave exactly the same way, menu on player/target/party but nothing on raid.
What could be wrong ?
local function menu(self)
local cunit = self.unit:gsub('(.)', string.upper, 1)
if(_G[cunit..'FrameDropDown']) then
ToggleDropDownMenu(1, nil, _G[cunit..'FrameDropDown'], 'cursor')
elseif(self.unit:match('^party')) then
ToggleDropDownMenu(1, nil, _G['PartyMemberFrame'..self.id..'DropDown'], 'cursor')
elseif(self.unit:match('^raid')) then
self.name = unit
RaidGroupButton_ShowMenu(self)
end
end
Guys, I've decided to make it easier for haste and lock this thread. As far as I know it will remain available, but Haste prefers to use seperate threads for layouts (which was my intention too when I made this thread) and oUF core.
Well, the reason I'd do this, is to show support to haste for his decision. It's his addon, that's all. I am cool with keeping this thread, but it would also mean that we or double post a lot wowace <> wowi or that one of both will not thrive. That's all. I feel we owe him the respect.
wowi is a different community.. and I'd prefer to discuss stuff with the people here. maybe not everyone wants to register there to ask a question and we might also be able to help here.
Well, if haste is fine with it. I have no objections of course. Though perhaps bundling this info (seriously, this thread has a lot of it) could be a good "how to write a layout for oUF" wiki page.
Well I suck then, but I still got it working :p
Party, Partypet, Raid (any group UF really) are headers, not units, and that line will use 100 as width for party/raid/partypet and 200 for the rest(player, target, focus etc).
Im gonna find a diffrent approach than using string.match
It has advantages such as: Less readability and increased horribleness when it comes to maintaining it.
As in 1 function for each unit?
I think tapeworm functions with many conditionals to fit everything in one huge function is bad style .9
lol
This is quite weird, i've replaced mine with yours but it behave exactly the same way, menu on player/target/party but nothing on raid.
What could be wrong ?
oUF - General discussion
oUF - Layout discussion
For layouts -> oUF Layouts
For core -> oUF Core
Edit: I'd lock it if I could. vBulletin just pwned me there.
The one on WoW-I.