oUF 1.4 documentation thread
Maybe we can gather some kind of documentation thread for all the oUF 1.4 features.
Current wiki: http://wiki.github.com/haste/oUF/ oUF 1.4 the list http://www.wowinterface.com/forums/s...ad.php?t=29937 Latest commit: http://github.com/haste/oUF/commits/master |
What I'm looking for is a documentation on how to spawn units.
Especially those that can be tricky. - party - raid - boss - vehicle - partypet - raidpet - arena - arenatarget |
Here's the wiki related todo items on my list:
- [3] Document changes between 1.3.x and 1.4.x - [3] Write wiki page about pit falls - [2] Write wiki page about the core - [1] Write wiki page about auras - [1] Write wiki page about how the event handler differ - [1] Write wiki page about how hooks/callbacks work - [1] Write wiki page about portraits - [1] Write wiki page about rune bar - [1] Write wiki page about tags - [1] Write wiki page about the element system - [1] Write wiki page about the range element The number in front is the priority it has. I won't be able to do anything with any of these until August however =/. |
I'm currently spawning maintank (and maintank target via xml template) and boss frames like this
Code:
self:SetActiveStyle"Nivea - Boss" and I adress them via Code:
local UnitSpecific = { |
Can anyone explain my the new SpawnHeader for party please. God...this doesn't work for me...:(
crap...I had to use a setpoint on party... |
oUF:SpawnHeader(overrideName, template, visibility, ...)
- overrideName: just a custom frame name. Leaving it as nil/false will make oUF generate one based on style (and "unit"). Like: oUF_LilyParty. - template: What template to base the header on. Leaving it as nil/false will make oUF use SecureGroupHeaderTemplate. - visibility: A comma separated string that controls the headers visibility. By default oUF defines the following states: Code:
raid40: Show when in a raid with 26 or more, but not party. You can also create custom visibility rules with: Code:
custom [combat] show;hide Lua Code:
The main reason that it has solo in the visibility list is really because I tend to do showSolo, true when I want to test some minor things. It can safely be removed. Hope this helps slightly at least :P. |
Oh, and don't be afraid to ask questions regarding 1.4.x stuff. My vacation starts in 36 hours, so I'll probably be quite AFK until the weekend. I'll try to answer as much as possible before that time.
|
Is it possible to use raid10, raid25 and raid40 as UnitSpecific, directly? I mean just like player, pet, etc.
Something like this ... Code:
local UnitSpecific = { |
oUF doesn't really know about the visibility states when it executes the style function, but it does feed it 'party' and 'raid' now, instead of nil.
|
In previous versions of oUF, my personal layout had a code to skin the mirrorbars to match my castbars...It seems that that same code is currently non-functional in 1.4. I am in no means an expert at lua, but if you could point me in the right direction to updating my code for 1.4, I'd appreciate it.
|
oUF does not care about mirrorbars.
Code:
for _, bar in pairs({'MirrorTimer1','MirrorTimer2','MirrorTimer3',}) do |
Thanks for the quick reply Rostok. That code was very similar to what I had previously used, and with a little tweeking is now working for me just fine :)
|
My own oUF/elements/aura.lua documentation
Hopefully most of the stuff is correct --[[ Elements handled: self.Auras, self.Buffs, self.Debuffs Icon sub-objects: - button.overlay: contains the border that will get displayed on on specific debuffs - button.parent:containts the parent object the current button is attached to - button.icon: the texture of the aura icon that is displayed on the button - button.count: some buttons have a stack (count) this is the fontstring that contains the stack - button.cd: the cooldown spiral Other sub-objects: - icon.isPlayer: is the caster of the icon the player - icon.owner: owner of the icon - icon.filter: filter for icon display - icon.debuff: defines if the icon is a debuff - auras.visibleBuffs: number of visible buffs displayed - auras.visibleDebuffs: number of visible debuffs displayed - auras.visibleAuras: number of visible auras displayed self.Auras, self.Buffs, self.Debuffs (shared): - .spacing: Padding between aura icons. (Default: 0) - .size: Size of the aura icons. (Default: 16) - .initialAnchor: Initial anchor in the aura frame. (Default: "BOTTOMLEFT") - .onlyShowPlayer: Only display icons casted by the player. (Default: nil) - ["growth-x"]: Growth direction, affected by initialAnchor. (Default: "UP") - ["growth-y"]: Growth direction, affected by initialAnchor. (Default: "RIGHT") - .disableCooldown: Disable the Cooldown Spiral on the Aura Icons. (Default: nil) - .filter: Expects a string with filter. See the UnitAura[1] documentation for more information. [1] http://www.wowwiki.com/API_UnitAura .Auras only: - .gap: Adds a empty icon to separate buffs and debuffs. (Default: nil) - .numBuffs: The maximum number of buffs that should be shown. (Default: 32) - .numDebuffs: The maximum number of debuffs that should be shown. (Default: 40) - .buffFilter: See filter on Shared. (Default: "HELPFUL") - .debuffFilter: See filter on Shared. (Default: "HARMFUL") - Variables set by .Auras: - .visibleBuffs: Number of currently visible buff icons. - .visibleDebuffs: Number of currently visible debuff icons. - .visibleAuras: Total number of currently visible buffs + debuffs. .Buffs only: - .num: The maximum number of buffs that should be shown. (Default: 32) - Variables set by .Buffs: - .visibleBuffs: Number of currently visible buff icons. .Debuffs only: - .num: The maximum number of debuffs that should be shown. (Default: 40) - Variables set by .Debuffs: - .visibleDebuffs: Number of currently visible debuff icons. Functions that can be overridden from within a layout: - PostCreateIcon(self, button) - PostUpdateIcon(self, unit, icon, index, offset) - PostUpdate(self, unit) - PreUpdate(self, unit) - PreSetPosition(self, num) Examples on how to attach functions to your layout: -------------------------------------------------- -- POSTCREATEICON FUNCTION -- lets you style aura icons after they got created -------------------------------------------------- local function myPostCreateIcon(self, button) --do stuff end --possible calls self.Auras.PostCreateIcon = myPostCreateIcon self.Buffs.PostCreateIcon = myPostCreateIcon self.Debuffs.PostCreateIcon = myPostCreateIcon -------------------------------------------------- -- POSTUPDATEICON FUNCTION -- lets you do stuff to aura icons once they got updated -------------------------------------------------- local function myPostUpdateIcon(self, unit, icon, index, offset) --do stuff end --possible calls self.Auras.PostUpdateIcon = myPostUpdateIcon self.Buffs.PostUpdateIcon = myPostUpdateIcon self.Debuffs.PostUpdateIcon = myPostUpdateIcon -------------------------------------------------- -- POSTUPDATE FUNCTION -- lets you do stuff to auras after they get updated -------------------------------------------------- local function myPostUpdate(self, unit) --do stuff end --possible calls self.Auras.PostUpdate = myPostUpdate self.Buffs.PostUpdate = myPostUpdate self.Debuffs.PostUpdate = myPostUpdate -------------------------------------------------- -- PREUPDATE FUNCTION -- lets you do stuff to auras before they get updated -------------------------------------------------- local function myPreUpdate(self, unit) --do stuff end --possible calls self.Auras.PreUpdate = myPreUpdate self.Buffs.PreUpdate = myPreUpdate self.Debuffs.PreUpdate = myPreUpdate -------------------------------------------------- -- PRESETPOSITION FUNCTION -- lets you do stuff to auras before they get arranged in position -------------------------------------------------- local function myPreSetPosition(self, num) --do stuff end --possible calls self.Auras.PreSetPosition = myPreSetPosition self.Buffs.PreSetPosition = myPreSetPosition self.Debuffs.PreSetPosition = myPreSetPosition ]]-- |
Quote:
|
Code:
local party = self:SpawnHeader(nil, nil, 'raid,party,solo', 'showParty', true, 'showPlayer', true, 'yOffset', -20) |
Question: How to adress party pets and raid pets?
I'm using Code:
local UnitSpecific = { I spawn party pets via XML, they are there, but they inherit everything from party (oh wonder...). How can I change the appearance of party and raid pets? How to adress them if I build my layout like that? |
Quote:
|
is it buff or?
can't understand, how can i find is it buff or debuff in a PostCreateIcon function...
now I use different functions for creating icons for buffs and debuffs, perhaps you can do as it otherwise? |
Quote:
|
Just check for button.debuff ! This one is filled if the aura is a debuff.
|
All times are GMT -6. The time now is 11:17 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI