Thread Tools Display Modes
11-27-09, 06:30 AM   #1
Prosthesy
A Defias Bandit
Join Date: Nov 2009
Posts: 3
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!
  Reply With Quote
11-27-09, 07:13 AM   #2
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
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.
  Reply With Quote
11-27-09, 08:40 AM   #3
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
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).
__________________
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
11-27-09, 06:59 PM   #4
Prosthesy
A Defias Bandit
Join Date: Nov 2009
Posts: 3
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.
  Reply With Quote
11-28-09, 04:05 AM   #5
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
1) Target buffs are there by default, too.

2) Which version of oUFviv, did you used to alter?
__________________
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

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF_viv Buffs/ToT Questions

Thread Tools
Display Modes

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