I like have the "range" function on my target. I tried using the following code snippet on my target - but unless I am targeting MYSELF any target "fades" even though I am standing right next to them.
This function seems to work on the party frames - what am I missing?
Thanks for the help.
if(unit == "target" or not unit) then
self.Range = true
self.inRangeAlpha = 1
self.outsideRangeAlpha = .5
end
local pvp = ""
if UnitIsPVP(unit) then
pvp = "[PvP]"
end
I am not surprised that when my PvP flag goes DOWN and my health is not actively changing the PvP flag stays up. As soon as my health changes the PvP notification text goes away.
How can I "register" an event that looks for this change without having to have my health updated?
Oh thanks, missread Tex for Text, one last thing, cuz i didn't find on wowwiki, how do i read/understand (0.57, 0.90, 0.08, 0.41), because it's obviously not colors, or coordinates so.
I can help with this one - I asked the same a long time ago. Those are color representations using the 0-1 format. Instead of doing RGB 0-255 they divide each number by 255 and display the decimal.
So - 255 would be 255/255 = 1. The fourth number is optional, it is the transparency of the color.
if you add event, it will work instantly.
This event is called when blizzard basic ui option (HIDE_PARTY_INTERFACE) is changed.
partyToggle:RegisterEvent("CVAR_UPDATE")
I found this to be inconsistent - it actually got out of synch somehow - as I clicked on and off it had the opposite effect - unchecking the "hide party in raid" would hide the party, checking it would show party - and I had trouble getting rid of the partytargets (didn't have pets in my party to know if they had a problem).
Why delete and recreate each frame? Hide() and showing really should work and i see no reason other to the fact that maybe oUF does a frame:Show() in some function.
As I posted - for some reason it doesn't work.
Thanks 8izips - I will try this
EDIT: @ 8izips: This works - but I need to ReloadUI to get it to change - is this the expected behavior or should it turn them on/off instantly?
Spawn has the arguments: unit, name, isPet. So for spawning pets you want a true at the end. I dont think you need to hide the frames as oUF should do that for you, but frame:Hide() and frame:Show() should still apply.
The true must be by default, because like I said they spawn perfectly. The firs code posting works perfectly - they frames spawn while in party.
The second code posting shows 2 methods I have tried using to HIDE the frames. In my code right before the 2nd code posting is party:Hide() - which works great - the party frames HIDE but the partyPets and partytargets are still displayed.
You do a :SetPoint at line 412, so you have to use :ClearAllPoints().
Thank you Haste! And another thank you for creating this framework. I have learned quite a bit about Lua from messing with these frames, something I would never have done if I had continued using PitBull. I know there is still a long road ahead before I "really" understand what is going on.
Thanks!
edited to properly reference the Lua programming language :)
Something is modifying I believe in Ammo's setup - LEFT LEFT seems to force it into place.
The culprit - Ammo's getFontString function. Seems I need to rewrite everything, which I wanted to do anyways :)
local function getFontString(parent)
local fs = parent:CreateFontString(nil, "OVERLAY")
fs:SetFont(font, fontHeight)
fs:SetShadowColor(0,0,0)
fs:SetShadowOffset(0.8, -0.8)
fs:SetTextColor(1,1,1)
fs:SetJustifyH("LEFT")
return fs
end
if unit == "targettarget" then
hp.value:SetFont(font_ital, fontHeight-2)
hp.value:SetPoint("CENTER", hp, "CENTER")
hp.value:SetJustifyH("CENTER")
end
I think :)
I keep trying that - I think there is something else changing the position. As I am editing Ammo's code I admit to not knowing 100% of what is going on.
When I try
hp.value:SetPoint("LEFT", hp, "CENTER")
it is closer - but something keeps moving it RIGHT it seems after the centering.
And consider me BAFFLED - the following seems to work:
hp.value:SetPoint("LEFT", hp, "LEFT")
I don't understand why this is working. But it is lol.
I am hoping someone can take a look at my pastey - line 416 - I am having MUCH trouble getting the health text to center exactly on the targettarget frame.
I know it is my noobish hack ways - perhaps someone can take a peek?
It is sad, yes, I know, but I admit defeat. I am having trouble figuring out the changes needed to now get the pet happiness to display.
So far I have not seen anyone update their layouts yet to capture this change. I have read this thread and I admit not having the correct number of cells aligned in the proper order to get this to work.
I will continue scratching the hair off of my already balding head, but if someone could throw me a very descriptive bone here I would be most appreciative. I am using oUF_Ammo as the "base" for my layout.
Thanks in advance for any help providide, /duck, /cover and /hide for any snide comments such as "L2LUA" or similar.
I am attempting to make my health text centered on an oUF frame. I figured this was a general coding question so I would post it here.
I had thought textobject:SetPoint("CENTER", <frame>, "CENTER", 0,0) would translate into: "The center point of the text object to be placed in the center of the <frame> with no offsets".
What I get is the text on the RIGHT of the frame.
Do I need to manually calculate an offset based on the number of characters in the textobject I am trying to center? Perhaps there is no "center" of a text string?
0
I like have the "range" function on my target. I tried using the following code snippet on my target - but unless I am targeting MYSELF any target "fades" even though I am standing right next to them.
This function seems to work on the party frames - what am I missing?
Thanks for the help.
0
I am not surprised that when my PvP flag goes DOWN and my health is not actively changing the PvP flag stays up. As soon as my health changes the PvP notification text goes away.
How can I "register" an event that looks for this change without having to have my health updated?
Thanks for the help!
0
I can help with this one - I asked the same a long time ago. Those are color representations using the 0-1 format. Instead of doing RGB 0-255 they divide each number by 255 and display the decimal.
So - 255 would be 255/255 = 1. The fourth number is optional, it is the transparency of the color.
Hope this helps!
0
I found this to be inconsistent - it actually got out of synch somehow - as I clicked on and off it had the opposite effect - unchecking the "hide party in raid" would hide the party, checking it would show party - and I had trouble getting rid of the partytargets (didn't have pets in my party to know if they had a problem).
0
As I posted - for some reason it doesn't work.
Thanks 8izips - I will try this
EDIT: @ 8izips: This works - but I need to ReloadUI to get it to change - is this the expected behavior or should it turn them on/off instantly?
0
The true must be by default, because like I said they spawn perfectly. The firs code posting works perfectly - they frames spawn while in party.
The second code posting shows 2 methods I have tried using to HIDE the frames. In my code right before the 2nd code posting is party:Hide() - which works great - the party frames HIDE but the partyPets and partytargets are still displayed.
0
Hmm - I am not sure what you mean. They spawn fine, I am trying to create a function to hide them. Sorry for being thick, I am a Lua newbie.
0
I have tried several methods of hiding them to no avail.
Any help would be appreciated!
0
Thank you Haste! And another thank you for creating this framework. I have learned quite a bit about Lua from messing with these frames, something I would never have done if I had continued using PitBull. I know there is still a long road ahead before I "really" understand what is going on.
Thanks!
edited to properly reference the Lua programming language :)
0
*puke*
Something is modifying I believe in Ammo's setup - LEFT LEFT seems to force it into place.
The culprit - Ammo's getFontString function. Seems I need to rewrite everything, which I wanted to do anyways :)
All text is getting SetJustifyH("LEFT") - DOH!
0
I keep trying that - I think there is something else changing the position. As I am editing Ammo's code I admit to not knowing 100% of what is going on.
When I try
it is closer - but something keeps moving it RIGHT it seems after the centering.
And consider me BAFFLED - the following seems to work:
I don't understand why this is working. But it is lol.
0
I am hoping someone can take a look at my pastey - line 416 - I am having MUCH trouble getting the health text to center exactly on the targettarget frame.
I know it is my noobish hack ways - perhaps someone can take a peek?
Me Pastey Linky
0
So far I have not seen anyone update their layouts yet to capture this change. I have read this thread and I admit not having the correct number of cells aligned in the proper order to get this to work.
I will continue scratching the hair off of my already balding head, but if someone could throw me a very descriptive bone here I would be most appreciative. I am using oUF_Ammo as the "base" for my layout.
Thanks in advance for any help providide, /duck, /cover and /hide for any snide comments such as "L2LUA" or similar.
0
Thank you very much!
0
I am attempting to make my health text centered on an oUF frame. I figured this was a general coding question so I would post it here.
I had thought textobject:SetPoint("CENTER", <frame>, "CENTER", 0,0) would translate into: "The center point of the text object to be placed in the center of the <frame> with no offsets".
What I get is the text on the RIGHT of the frame.
Do I need to manually calculate an offset based on the number of characters in the textobject I am trying to center? Perhaps there is no "center" of a text string?
Thanks for any help...