View Single Post
10-28-12, 09:37 PM   #10
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by burnmaker View Post
Here it is
Okay, I see the problem. There are actually two problems.

1. You are confusing the player/target castbars. In your own screenshot, the player castbar is the one on top with time text, and the target castbar is the one on the bottom with the name shown.

2. I was looking at the wrong coordinate when I wrote that code, and based the castbar position on the frame X position, not the frame Y position. Here are the correct castbar coordinates, also adjusted to take into account the extra width of the icon, and made taller to match the full height of the player/target unit frames:

Code:
		if unit == "player" then
			Castbar:ClearAllPoints()
			Castbar:SetPoint("BOTTOM", UIParent, "CENTER", 0.5 * height, -230)
			Castbar:SetWidth(config.width)
			Castbar:SetHeight(config.height)
Code:
		elseif (uconfig.width or 1) > 0.75 then
			if unit == "target" then
				Castbar:ClearAllPoints()
				Castbar:SetPoint("TOP", UIParent, "CENTER", 0.5 * height, -242)
				Castbar:SetWidth(config.width)
				Castbar:SetHeight(config.height)
			end
You will also, as Ekaterina said, need to either move the frames further apart using oUF_MovableFrames or by editing the coodrinates in config.lua:

Code:
ns.uconfig = {
	player = {
		point = "BOTTOMRIGHT UIParent CENTER -146 -230",
		power = true,
		castbar = true,
	},
	...
	target = {
		point = "BOTTOMLEFT UIParent CENTER 146 -230",
		power = true,
		castbar = true,
	},
Adjust the X values in the uconfig section as desired.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.

Last edited by Phanx : 10-28-12 at 10:24 PM.
  Reply With Quote