oUF - Layout discussion
The old oUF thread over at WoWace has become, quite a monster to say it softly. It's a mess of bug reports, layout issues and general issues/feature people have/want.
Please use this thread for layout discussion only. Related forum thread: oUF - General discussion Bug reports and feature requests should be posted over at the author portal. Issues with specific layouts should be posted in their respective place (not here, unless you are the author of the layout in question (and don't you dare to bend this exception! :p)). |
Haste, is there actually a way to overwrite/override the pvp functions, because I prefer a textual tag, but would like to do that by not editting the oUF core?
|
There isn't any internal functions for that on PvP, mostly because it's a shared event, and the shared event system is still to be written.
You can however do: self.UNIT_FACTION = myOwnUpdatePvPFunction;. Setting functions directly on the layout doesn't touch the core at all. |
Quote:
|
Is it possible to change the level of a text (fontstring) the same way it works for frames (SetFrameLevel).
I'm toying with portraits and would like to display something over it, but right now the portrait comes above of the text. |
Maybe I can help you out here. You could just use a helperframe that lays between portrait and text.
Code:
|
|
Quote:
|
Quote:
Code:
self.Health.value = SetFontString(self.Health, font,(unit == 'player' or unit == 'target') and 10 or 9) Code:
self.Portrait = CreateFrame('PlayerModel', nil, self) |
At what layer is your font-strings created? OVERLAY should position your text above the model just fine.
|
Quote:
Code:
local fs = parent:CreateFontString(nil, 'OVERLAY') Code:
self.Health:SetFrameLevel(unit and 1 or 2) Code:
self.Highlight = self:CreateTexture(nil, 'HIGHLIGHT') |
Then it's probably your portrait that has a rather high frame level. You can do the following however:
a) Change the frame level of the portrait. or b) Create the font-strings with the portrait as parent. |
Weird, i'm sure i tried to change the portrait level before and it didn't work for some reason, now it does. Anyway thanks, though i don't know yet if i like the result or not :)
Anyway, i'd like to understand something, since i've added portraits, i've created a "fake" frame above them so they don't look so flat, i've anchored a few things to that "fake" frame, like health value, power value and so on and it works just fine. But, when i try to do the same with Druidmana, it works but return an error. I'm not sure to understand it because it works for everything else using the exact same method, why not for Druidmana. Code:
Interface\AddOns\oUF_Caellian\oUF_Caellian.lua:56: attempt to index local 'parent' (a nil value) Code:
if(IsAddOnLoaded('oUF_DruidMana')) then Code:
if(portraits == true) then This didn't work, apparently self.Castbar.Text:GetText()) is not correct, is there any other way ? (only the hide part doesn't work here, the rest is fine, i just paste the whole thing) Code:
if(unit == 'target') then |
Creating Frame
Hi!
I wanted to create a black frame under player and target-frame. It worked for the player-frame, as you can see on the screenshot: But I'm not able to get it working for the target-frame. Any ideas how the code should look like? Here's my noobish code for the player-frame: Code:
blackbar = CreateFrame("Frame", nil, self) Vadda |
Quote:
something like blackframe:SetPoint('TOP', oUF.units.player, 'BOTTOM', 0, -9) blackframe2:SetPoint('TOP', oUF.units.target, 'BOTTOM', 0, -9) |
@Caellian:
try using "SetFont" instead of "SetFontString". ie.: self.DruidManaText = SetFont(font, 10) which lead me to the question... why use setfontstring? what does it have more than setfont? whats the point of setting a parent there? |
Quote:
Its a function to create the whole fontstring |
Quote:
Code:
blackbar2 = CreateFrame("Frame", nil, oUF.units.target) Now I see the second black-bar constantly on the bottom of the screen. Even if I have no target selected. Quite weird. |
Quote:
Code:
self.DruidManaText = SetFont(self.Portrait2, font, 10) Code:
Interface\AddOns\oUF_Caellian\oUF_Caellian.lua:458: attempt to call global 'SetFont' (a nil value) |
some help please
how in the earth do you move stuff, do you need to edit something in the .lua files or something
would love you help Zynix |
i have a trouble with target names, they run on target hp http://img139.imageshack.us/my.php?image=lolnv5.jpg
how it to correct? P.S. sorry for my english (: |
Caellian, you really need to stop using that edit button :p. Especially when you add ten pages of text (and that 3 hours after it's been posted).
1) "Interface\AddOns\oUF_Caellian\oUF_Caellian.lua:56: attempt to index local 'parent' (a nil value)" tells you that you should take a look at line 56 in your layout code. 2) :GetText() returns a string containing the text of the fontstring, it won't do some magic updating for you. What you could do is to remove .Name, and use the castbar .Text to display name. You can do this with a post hook in the stop functions. Remember that you will have to do all the name updating yourself, and that is has to be aware of casts/channels. vaddn, use locals and not globals when you create those frames. The initial code should work fine with that. zhz, it's because your fontstrings have no width limitations. You can set these with :SetWidth and/or :SetPoint. zynix, read up on :SetPoint, and look for it in the layout. Usually placed at the bottom. |
Quote:
|
Quote:
On another note, is it possible to add the AFK and DND flags with oUF? I've tried looking, but haven't managed to find an answer yet. The only reason I ask is that I have a bad habit of setting flags and forgetting about them if there is nothing to remind me on my character frame. |
Quote:
|
Quote:
Code:
oUF.Tags["[AFK]"] = function(u) return UnitIsAFK(u) and "AFK" or "" and then use those tags as you would normally. |
Quote:
(dont be fooled by the name of the event, it works for any unit) |
One question, i would like to have my experience bar to show but only when i mouseover it.
I've tried something like the code below but obviously it doesn't work, i know it's wrong but that's all i could come up with using wowwiki and unfortunately i couldn't find any better information on how to do this. Code:
local OnEnter = function(self) |
Quote:
Code:
self.Experience:SetScript('OnEnter', function(self) self:SetAlpha(1) end) |
Thanks a lot i will give it a try, it's a statusbar btw. (here's the main part of it)
Code:
if(IsAddOnLoaded('oUF_Experience')) then |
Quote:
|
Quote:
|
You'll need to set the alpha to 0 when it's loaded as well, or else it will be shown until moused over.
soo: Code:
self.Experience:SetScript('OnEnter', function(self) self:SetAlpha(1) end) |
...I am not editing, i am not editing, i am not editing...
Nvm the above, actually i didn't even need to use that, i just edited my current OnEnter/OnLeave, thanks for the hints. Code:
self:SetScript("OnEnter", function(self) Quote:
|
Quote:
So you'll need to force it to hide when shown i.e. Code:
local function Hide(f) |
Hmm this doesn't work at all
Code:
local function Hide(f) Code:
Interface\AddOns\oUF_Caellian\oUF_Caellian.lua:280: syntax error near 'f' |
Quote:
Code:
local function Hide(f) |
Quote:
I forgot the "function" bit, amoung other things :P. Post edited so it'll work now. |
Yes yes now it works, it's hidden on login, but it won't show up anymore :D
|
This is what i've got, hidden on login, but doesn't show up on mouseover.
Beginning of the style (where the OnEnter/OnLeave were) Code:
local function Hide(f) Code:
Hide(self.Experience) Code:
f:SetScript("OnShow", function() f.Hide end) Code:
Interface\AddOns\oUF_Caellian\oUF_Caellian.lua:282: '=' expected near 'end' |
Hiding Cooldown
Starting with latest oUF and oUF_Ammo layout. I'm using OmniCC for cooldown numbers, but I'd prefer not to show the numbers or clock animation.
I found the block of code in aura.lua that shows or hides the cooldown on the icon, but I haven't been able to figure out what code to call in oUF_Ammo to turn it off permanently. I can, of course, comment out the block of code, but then I'd have to do that every time I get a new version. I also tried creating my own PostUpdateAuraIcon like looked like this: Code:
-- params omitted for brevity |
Code:
local function PostCreateAuraIcon(self, button, icons, index, debuff) |
Quote:
|
Well, phooey. I originally tried adding button.cd:Hide() to auraIcon in oUF_Ammo. That's the name of the function that overloaded PostCreateAuraIcon.
Here is what I tried for that: Code:
local function auraIcon(self, button, icons, index, debuff) |
Quote:
Add a "noCooldownCount" entry for it. i.e. Code:
<cooldownframe>.noCooldownCount = true |
Aight, progress, by using
Code:
self:SetScript("OnEnter", function(self) Haste explained this Quote:
|
I'm setting up player auras and wanted to have them displayed with a numeric duration next to them, like Elk's BuffBars (just time, I don't care about bars).
Looking at the Blizzard API's, it seems like you're only supposed to be able to get durations for things you cast. Elk's code gets around this (I think) with the follow type of code: Code:
local buffIndex, untilCancelled = GetPlayerBuff(index, "HELPFUL") I think I can duplicate this, but I'd love two pointers: 1. Is PostUpdateAuraIcon() the hook I want to be using for this? It seems to have the information I want and is per-aura. 2. If so, why is the 'index' parameter a table? Still noobish with this stuff. |
Quote:
Code:
self:PostUpdateAuraIcon(icons, unit, icon, index, offset, filter, isDebuff) |
Fixing my faulty parameterization makes complete sense.
As to EBB, I suppose it's a good thing that I'm only interested in Buffs then. That code snippet was from EBB code, but likely from a incorrect context. Since I could can query the auras now *cough*, it should be easier to play with and figure out. |
Code:
Code:
self.Experience:SetScript("OnEnter", function(self) |
Quote:
|
Quote:
I was looking through the aura.lua code, saw only references to UnitBuff() and the like. Those functions only return durations on stuff cast by the player, so I thought that was the limitation. Getting information in a general way seems like the best method of doing things, so I didn't even think to search for a player specific version of those functions. GetPlayerBuffTimeLeft() is the ticket. Lesson learned. Thanks for the help! |
Quote:
Quote:
Quote:
|
Is there a way to show temp enhancements (Weapon Buffs) in the aura?
|
Take a look at my raid layout (oUF Perfect), its based on pure tags for text
|
Quote:
|
I came across a bizzare situation while setting up oUF. I don't think it's strictly related to oUF, but hopefully the bright minds reading this thread will have an idea as to why it happens.
Basically I spawned the party header, and no matter what I did the party members didn't show up. Calling :Show() on the party header manually would show the party for a split second then it would be hidden again. After long time of scratching my head, I decided to disable the other addons I use, and the party showed just fine. Then I enabled my addons one by one and narrowed down the problem to ClearFont2: if I have ClearFont2 enabled, oUF party header won't show up, if I disable it, the party shows up. This strikes me as quite a strange issue, I can't see what the link is between a secure party header and ClearFont2. Could it be that enabling CF2 loads a library that messes the header up? I'd appreciate if anybody has an idea on the cause of this, and even more how I could go about debugging this issue. What can affect the visibility of the header, generally speaking? Thanks in advance! |
A easy way to debug it is by doing the following on your header:
Code:
local Hide = party.hide |
Exp mouseover take 2
Aight, still on about the experience mouseover thingy, but with some progress this time.
It's now working correctly, 'almost', with the following code in the exp block of the layout, the exp bar + tooltip shows and hides on mouseover as expected. There is one very small issue left, on login or /rl, i have to mouseover the player frame before it starts working. If i don't do that, when i mouseover the exp bar only the tooltip is shown, not the bar itself. Code:
self:SetScript("OnEnter", function(self) |
Not to be completely evil (but quite a bit). Think about exactly what you logically want to do (all the steps of hooking and calling), and what you are doing now.
Or put in another way: Explain to yourself exactly what your code does every time you execute those two functions. |
All times are GMT -6. The time now is 07:59 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI