Thread Tools Display Modes
07-03-10, 10:47 AM   #21
Freebaser
A Molten Kobold Bandit
 
Freebaser's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 135
Originally Posted by zork View Post
Just check for button.debuff ! This one is filled if the aura is a debuff.
It wouldn't exist at that point. With PostUpdateIcon, you could check for icon.debuff though.
  Reply With Quote
07-03-10, 11:06 AM   #22
LCFHeLL
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 4
Originally Posted by Freebaser View Post
Have you tried using PostUpdateIcon instead?
oh... i'm so stupid
yes you'r right PostUpdateIcon help me with my problem.. thanks
  Reply With Quote
07-04-10, 02:18 PM   #23
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
Is there an official and/or intelligent way to use custom conditions to show party and raid?

I look into oUF.lua and found the default ones...
Code:
	local conditions = {
		raid40 = '[@raid26,exists] show;',
		raid25 = '[@raid11,exists] show;',
		raid10 = '[@raid6,exists] show;',
		raid = '[group:raid] show;',
		party = '[group:party,nogroup:raid] show;',
		solo = '[@player,exists,nogroup:party] show;',
	}
What I want to achieve is this:
- party frames are shown for up to 5 people - NO matter if in raid or not
- raid frames are shown for "NumRaidMembers" > 6 but HIDDEN otherwise

I currently got it to show party in a normal party, but 5 people raid still hides the party and shows raid frames instead. The main reason for all this is PvP, arena (and BGs) counts as raid and I want to use the style of my party frames for arena without having to go through different group layouts.


I don't want to use the raid/party toggle function, if possible. Since I do think the conditions are there, already - why not use them?
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine."
Paper: "OMG, WTF, Scissors!"
Scissors: "Rock is OP and Paper are QQers. We need PvP buffs."

"neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..."

  Reply With Quote
07-04-10, 03:03 PM   #24
Sojik
A Wyrmkin Dreamwalker
 
Sojik's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 53
Originally Posted by Dawn View Post
snip
Code:
custom [group:party,nogroup:raid][@raid6,noexists,group:raid] show;hide
for party and raid10 for the raid frames.

Last edited by Sojik : 07-04-10 at 03:06 PM.
  Reply With Quote
07-04-10, 04:43 PM   #25
Monolit
A Black Drake
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 81
For some reason I simply can't get my Boss, PartyPet, Arena and ArenaTarget frames to spawn.
Could anyone help me with this issue: http://www.wowinterface.com/forums/s...9&postcount=33

Last edited by Monolit : 07-04-10 at 04:50 PM.
  Reply With Quote
07-08-10, 03:22 PM   #26
Phatrik
A Murloc Raider
 
Phatrik's Avatar
AddOn Compiler - Click to view compilations
Join Date: Nov 2006
Posts: 4
All I'm missing is some documentation on the changes to Range, as "self.Range = true" no longer works (errors as boolean value).
  Reply With Quote
07-08-10, 03:50 PM   #27
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
Take a look at oUF_Lilly to see how self.Range is working now.
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine."
Paper: "OMG, WTF, Scissors!"
Scissors: "Rock is OP and Paper are QQers. We need PvP buffs."

"neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..."

  Reply With Quote
07-09-10, 04:51 AM   #28
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by Phatrik View Post
All I'm missing is some documentation on the changes to Range, as "self.Range = true" no longer works (errors as boolean value).
Code:
self.Range = {
    insideAlpha = 1,
    outsideAlpha = 0.3,
}
  Reply With Quote
07-09-10, 05:09 PM   #29
Tastyfrog
A Deviate Faerie Dragon
Join Date: Mar 2009
Posts: 15
How to i get rid of the annoying border on the icons?
  Reply With Quote
07-10-10, 03:07 AM   #30
Monolit
A Black Drake
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 81
I feel like giving up...
can't get arena frames/targets to spawn at alll, is it even possible with oUF1.4?

Last edited by Monolit : 07-10-10 at 03:10 AM.
  Reply With Quote
07-10-10, 06:10 AM   #31
Sojik
A Wyrmkin Dreamwalker
 
Sojik's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 53
Originally Posted by Monolit View Post
I feel like giving up...
can't get arena frames/targets to spawn at alll, is it even possible with oUF1.4?
The only thing I can think to try is switching oUF:Spawn to self:Spawn. That's the only thing I notice different in how oUF_Lily spawns units. Can you get any other units to spawn?
  Reply With Quote
07-10-10, 06:36 AM   #32
Mischback
A Cobalt Mageweaver
 
Mischback's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 221
Originally Posted by Tastyfrog View Post
How to i get rid of the annoying border on the icons?
Are you using a premade layout or creating your own one?
  Reply With Quote
07-10-10, 09:06 AM   #33
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
Units that where previously spawned like "self:GetParent..." are quite a pain now. At least if you are going with the "unit.specific function way" in 1.4. I do like that way a lot, it's clean, but I don't really understand why oUF doesn't address all units right from the start. I mean 1.4 got the "raid" and "party" thing, done in a better way than before. But why not expand this for "arena", "arenatarget", "partypet", ... ?

The way it is right now, I should have stick'ed with one stupid big style function and the whole shabby "If unit == whatever" when I rewrote my layout for 1.4.

I might be missing something, ofc. Maybe it's obviously obvious how to do address those units, now. But I don't get it.

Since this might sound like one big rant: I really like 1.4! I really appreciate what haste does on this awesome unit framework. Like I said in another post, it's pretty damn unlucky that haste released 1.4 shortly before leaving for so long. *sad panda*
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine."
Paper: "OMG, WTF, Scissors!"
Scissors: "Rock is OP and Paper are QQers. We need PvP buffs."

"neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..."

  Reply With Quote
07-10-10, 11:25 AM   #34
Tastyfrog
A Deviate Faerie Dragon
Join Date: Mar 2009
Posts: 15
Originally Posted by Mischback View Post
Are you using a premade layout or creating your own one?
Im creating my own. I tried changing button.icon and button.overlay in PostCreateIcon, but that didnt seem to work.
  Reply With Quote
07-10-10, 11:30 AM   #35
Monolit
A Black Drake
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 81
Originally Posted by Sojik View Post
The only thing I can think to try is switching oUF:Spawn to self:Spawn. That's the only thing I notice different in how oUF_Lily spawns units. Can you get any other units to spawn?
yep, there's absolutely no problem with any other unit (player,target,tot,pet,focus and party/raid headers). I even tried to spawn them both ways: with or without Factory() func, both worked.

It just feels that i'm missing something :S

My latest layout may be found here
  Reply With Quote
07-10-10, 01:24 PM   #36
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Originally Posted by Dawn View Post
Units that where previously spawned like "self:GetParent..." are quite a pain now. At least if you are going with the "unit.specific function way" in 1.4. I do like that way a lot, it's clean, but I don't really understand why oUF doesn't address all units right from the start. I mean 1.4 got the "raid" and "party" thing, done in a better way than before. But why not expand this for "arena", "arenatarget", "partypet", ... ?

The way it is right now, I should have stick'ed with one stupid big style function and the whole shabby "If unit == whatever" when I rewrote my layout for 1.4.

I might be missing something, ofc. Maybe it's obviously obvious how to do address those units, now. But I don't get it.

Since this might sound like one big rant: I really like 1.4! I really appreciate what haste does on this awesome unit framework. Like I said in another post, it's pretty damn unlucky that haste released 1.4 shortly before leaving for so long. *sad panda*
The main reason it doesn't provide proper units for party{target,pet}N is because it can be a real pain to figure out what the layout is spawning. Right now it only looks at the headers attributes and feed the values based on showParty and showRaid. To me it seemed good enough, even though units such as partypetN still will show as nil.

I really how now idea what you mean with adding support for arena, arenatarget and partypetN. It isn't supported by oUF because the Blizzard secure header doesn't really provide us with a proper way of doing it. oUF is able to handle party{pet,target}N through the header templates, but only as a sub-frame of their owner, and this is done through a XML hack really.

I also released 1.4 before I went on vacation because it had gotten over a month of testing, and I had told several people that I wanted to have it out early July, or at least before I left. That being said I'm still around, but I mostly read and don't post (because my main internet access is currently 3G and my android).
__________________
「貴方は1人じゃないよ」
  Reply With Quote
07-10-10, 02:05 PM   #37
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
My problem with party pets etc. does not come from not being able to spawn them - at least party pets are easy via xml, even though I've not yet tried to spawn arena frames. The problem is how to address them, aka how to change the size etc. since they inherit those from it's parent (party) and you don't want to have party pets the size of your party and a lot of the functions (let's say portraits or something), neither.

For example I spawn my units like you do in lilly and classic.

via
Code:
local UnitSpecific = {
	player = function(self)
end,
and party raid via (separate, because of self.Range)
Code:
	UnitSpecific.party = function(self)
....
	end
Now where to put things like (self:GetName():match"oUF_Arena") ? It throws an error if you try to put it somewhere else, but the shared style. Thing is I have all things like castbar, portraits, borders, etc. in between the shared style function and the unit.specific functions. And all are separate functions that I call only in those units I want the function to be part of. For example "function = createCastbar(self, unit)" is called via "createCastbar(self)" for player, target and focus, only.

It just doesn't seem very clean to spawn everything via a function and having to "go back" to things like ...

if unit == (self:GetName():match"oUF_Arena") then ...

... for certain units? Feels shabby and brings up some problems with how to bring functions in the right order, imho.


Do I have to do something like
Code:
local PartyPet = self:GetAttribute("unitsuffix") == "pet"
and then put it in here? But where to put the local without an error on "self"?

Code:
	UnitSpecific.party = function(self)
....

if unitIsPartyPet then

 *whole different story than "UnitSpecific.party"*

end
	end
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine."
Paper: "OMG, WTF, Scissors!"
Scissors: "Rock is OP and Paper are QQers. We need PvP buffs."

"neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..."


Last edited by Dawn : 07-10-10 at 02:08 PM.
  Reply With Quote
07-10-10, 03:37 PM   #38
Monolit
A Black Drake
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 81
Originally Posted by Dawn View Post
...
I know that partypets can be done via xml easily, but my problem is arena frames/targets, pre oUF 1.4 I used to spawn them like this:
from my old oUF layout:
lua Code:
  1. if not IsAddOnLoaded("Gladius") then
  2.         local arena = {}
  3.             for i = 1, 5 do
  4.                 arena[i] = self:Spawn("arena"..i, "oUF_Arena"..i)
  5.                 if i == 1 then
  6.                     arena[i]:SetPoint("BOTTOMRIGHT", UIParent, "RIGHT", -90, -100)
  7.                 else
  8.                     arena[i]:SetPoint("BOTTOM", arena[i-1], "TOP", 0, 8)
  9.                 end
  10.             end
  11.         local arenatarget = {}
  12.             for i = 1, 5 do
  13.                 arenatarget[i] = self:Spawn("arena"..i.."target", "oUF_Arena"..i.."target")
  14.                 if i == 1 then
  15.                     arenatarget[i]:SetPoint("TOPRIGHT", arena[i], "TOPLEFT", 4, 0)
  16.                 else
  17.                     arenatarget[i]:SetPoint("BOTTOM", arenatarget[i-1], "TOP", 0, 8)
  18.                 end
  19.             end
  20.     end
I used to have 1 shared style function, so that's how I addressed to stuff like arenaN/arenaNtarget/partypetN (using buffs/debuffs as example):
lua Code:
  1. if not (unit and (unit:find('partypet%d') or unit:find('arena%dtarget'))) then
  2. --if i don't specify unit:find('arena%dtarget') here then it will inherit unit:find('arena%d')
  3. --attributes and spawn buffs/debuffs on arenatarget frames (what we obviously don't want)
  4.                 self.Buffs:...
  5.                 self.Debuffs:...
  6.             if unit=="player" then
  7.                 self.Buffs:...
  8.                 self.Debuffs:...
  9.             elseif (self:GetParent():GetName():match"oUF_Party") then
  10.                 self.Buffs:...
  11.                 self.Debuffs:...
  12.             elseif (unit and unit:find('arena%d')) then -- there you go, our buffs/debuffs for arena frames
  13.                 self.Buffs:...
  14.                 self.Debuffs:...
  15.             end
  16.         end

so basically you can address that kind of frames from anywhere given that function provides us with unit, e.g.
lua Code:
  1. local function OverrideUpdateName(self, unit)
  2.     if(self.unit ~= unit or not self.Name) then return end
  3.     local uName = UnitName(unit) or 'Unknown'
  4.     if(unit == 'player') then
  5.         self.Name:Hide()
  6.     elseif(unit == 'target') then
  7.         self.Name:SetFormattedText(utf8sub(uName, 18, true))
  8.     elseif unit and unit:find('arena%dtarget') then
  9.         self.Name:SetFormattedText(utf8sub(uName, 2))
  10.     elseif (unit == 'pet' and uName == 'Unknown') then
  11.         self.Name:SetText('Pet')
  12.     elseif unit and unit:find('boss%d') then
  13.         self.Name:SetText(uName)
  14.         self.Name:SetWidth(75)
  15.         self.Name:SetHeight(15)
  16.     else
  17.         self.Name:SetFormattedText(utf8sub(uName, 10, true))
  18.     end
  19. end

Actually I've just tested my old layout (using oUF 1.3.28) and it seems to be working apart of few minor flaws here and there:


So I just don't have a slight clue about what's wrong and why I can't get arena frames to spawn using oUF 1.4 .
I'd appreciate any advice or ideas .

[OFF] P.S. Android owns :] [/OFF]

EDIT: I think I found the solution, will post after some testing

Last edited by Monolit : 07-10-10 at 07:12 PM.
  Reply With Quote
07-10-10, 05:18 PM   #39
Mischback
A Cobalt Mageweaver
 
Mischback's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 221
Originally Posted by Tastyfrog View Post
Im creating my own. I tried changing button.icon and button.overlay in PostCreateIcon, but that didnt seem to work.
Hm, I can only imagine, that you mean the default button-look by "annoying border".
Not really tested this myself, but what about hooking icons.CreateIcon and not using a button as template but a flat frame? You'll have to deal with it specifically, regarding mouseclicks to cancel buffs, but that should do the trick, because when you use your own "CreateIcon()"-function, you should have full control about the look of your buff-icons.
You may want to check my layout (line 184), since I'm doing exactly this to apply my layout-specifc borders to the icons.

[OFFTOPIC] Android ftw [/OFFTOPIC]
  Reply With Quote
07-10-10, 11:01 PM   #40
Sojik
A Wyrmkin Dreamwalker
 
Sojik's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 53
Originally Posted by Monolit View Post
EDIT: I think I found the solution, will post after some testing
Please do. I'm curious.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF 1.4 documentation thread


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