View Single Post
10-28-12, 06:45 PM   #9
Ekaterina
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 65
Burn,
You just need to adjust the set point a little.

The SetPoint api works like this: Part of the frame you are anchoring from ie Castbar; the frame you are anchoring to ie UI Parent; part of the frame you are anchoring the part of the frame you are anchoring from to ie Center; horizontal offset; vertical offset.

From what I understand of your reqest you should just be able to do the below, but you will need to either move the unit frames a little further apart or change the size of the cast bar.

If you wish to move the frames either ouf:Movable frames or edit the point value in the config for player and target.

Lua Code:
  1. if unit == "player" then
  2.             [color=palegreen]Castbar:ClearAllPoints()[/color]
  3. [color=palegreen]            Castbar:SetPoint("BOTTOM", UIParent, "CENTER", 0, -230)[/color]
  4. [color=palegreen]            Castbar:SetWidth(config.width)[/color]
  5.  
  6.             Castbar.SafeZone = Castbar:CreateTexture(nil, "BORDER")


Lua Code:
  1. elseif (uconfig.width or 1) > 0.75 then
  2. [color=palegreen] if unit == "target" then[/color]
  3. [color=palegreen] Castbar:ClearAllPoints()[/color]
  4. [color=palegreen] Castbar:SetPoint("TOP", UIParent, "CENTER", 0, -232)[/color]
  5. [color=palegreen] Castbar:SetWidth(config.width)[/color]
  6. [color=palegreen] end[/color]
  7.  
  8. Castbar.Text = ns.CreateFontString(Castbar, 16, "LEFT")

I hope I've understood your request correctly and not confused you.

Ekat
  Reply With Quote