WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   oUF (Otravi Unit Frames) (https://www.wowinterface.com/forums/forumdisplay.php?f=87)
-   -   oUF_viv Buffs/ToT Questions (https://www.wowinterface.com/forums/showthread.php?t=28743)

Prosthesy 11-27-09 06:30 AM

oUF_viv Buffs/ToT Questions
 
Back again after a bit more fiddling with Lua editors. I'm still inexperienced when it comes to coding of any kind, but I've been able to tinker my way through most of my UI. Still, after 6 or 7 hours of messing with oUF_viv, there are a couple things I have yet to figure out.

Here's what I would like some help with, if possible, please:

1) Buff/Debuff icon movement. I've scaled them, but I cannot figure out how to move them. I'm not sure if the means are already there, or if I'd need to write them in myself. (I also need a way to move the buff/debuff background texture as well). I messed with the coordinates in every way I could think of.

Code:

local function auraIcon(self, icon, icons, index, debuff)
                icons.showDebuffType = true -- show debuff border type color
                icon.cd.noOCC = true
                icon.cd.noCooldownCount = true
                icons.disableCooldown = true       
               
                icon.count:SetFont(font, fontS-14, fontF)
                icon.count:SetPoint("TOPRIGHT", icon, 4, 22)
       
                icon.time = icon:CreateFontString(nil, 'OVERLAY')
                icon.time:SetFont(font, fontS-13, fontF)
                icon.time:SetPoint('TOP', icon, 'BOTTOM', 0, 8)
                icon.time:SetJustifyH('CENTER')
                icon.time:SetVertexColor(trdcolor[1], trdcolor[2], trdcolor[3])
               
                icon.icon:SetTexCoord(.07, .93, .07, .93)
                icon.icon:SetPoint("TOPLEFT", icon, "TOPLEFT", 2, -2)
                icon.icon:SetPoint("BOTTOMRIGHT", icon, "BOTTOMRIGHT", -2, 2)
               
                icon.overlay:SetTexture(buffborder)
                icon.overlay:SetTexCoord(0,1,0,1)
                icon.overlay.Hide = function(self) self:SetVertexColor(trdcolor[1], trdcolor[2], trdcolor[3]) end
                --icon.overlay.Hide = function(self) self:SetVertexColor(maincolor[1],maincolor[2],maincolor[3]) end               
end


2) I know it is probably some stupid error made on behalf of my failure at Lua, but I can't find a Text Orientation command. It took me ages to figure out how to get a Target of Target frame center-screen with the name in the middle, only to see that most of the targets' names fall off to the right of the frame.


I can already tell I'm going to have questions later about target buffs/debuffs, seperate-color raid frames, etc. but I'll cross that bridge when I get to it.

UI for reference:
http://i983.photobucket.com/albums/a...709_041733.jpg

Thank you so much!

yj589794 11-27-09 07:13 AM

Hi,

Your obviously trying to learn more about lua and oUF, so I'll just give a few pointers:

1) Check out SetPoint for how to position objects. The routine you've posted is to do with updating the auras displayed, the style function will be where the position of the auras are initially done.

2) Again, look into SetPoint and at which point you anchor your object.

Dawn 11-27-09 08:40 AM

Like yj589794 already pointed out, the function is almost purely for styling the aura icons (border, color, position of duration,...).

You have to look for buff and debuff SetPoints deeper in the lua.

You sometimes have to ClearSetPoints if you want to reposition certain things (like unit name).

Prosthesy 11-27-09 06:59 PM

Alright, hopefully these will be my last questions before this UI is done, thank you all for the help.

1) I can't figure out how to spawn target Buffs. The Debuffs are there by default, but even trying to change that code around isn't working for me. I looked in the WoW API about UnitAura and UnitBuff but none of it is helping in this case.

2) I bound a few of my mouseover macros to my mousewheel. The mouseover function works on the raid frames, but not the Player, Target, or TargetTarget frames. Clique, however, works everywhere. Anything that can be done to fix it?

Thanks again.

Dawn 11-28-09 04:05 AM

1) Target buffs are there by default, too. :rolleyes:

2) Which version of oUFviv, did you used to alter?


All times are GMT -6. The time now is 06:47 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI