Quantcast
My CombatIndicator spawns "behind" the frame. - WoWInterface
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
05-11-18, 02:04 AM   #1
dzreams
A Defias Bandit
Join Date: Jan 2018
Posts: 2
My CombatIndicator spawns "behind" the frame.

Hello, first of all this project is really quite wonderful, but I'm running into a little issue where my CombatIndicator seems to spawn behind the actual frame:



If you look closely, the indicator is "infront" of the background, but "behind" the health bar - when I remove the statusbar elements this is still the case, so somehow I am drawing my statusbars in front of the indicator. I've tried a few things:
  • Hiding the statusbar backgrounds
  • Giving the statusbar and statusbar.bg different "layers"
  • Different order of things
But haven't got to a nice solution. Anyway, here are the relevant codes:

Code:
  self.Health = createStatusBar(self)
  self.Health:SetPoint("TOPLEFT", self, "TOPLEFT", conf.borderSize, -conf.borderSize)
  self.Health:SetPoint("TOPRIGHT", self, "TOPRIGHT", -conf.borderSize, -conf.borderSize)
  self.Health:SetPoint("BOTTOMLEFT", self, "TOPLEFT", 0, -healthHeight)
  self.Health:SetPoint("BOTTOMRIGHT", self, "TOPRIGHT", 0, -healthHeight)
  self.Health.colorSmooth = true
  self.Health.colorClass = true
  self.Health.bg.multiplier = conf.bgMultiplier
Code:
  if unit == "player" then
    self.CombatIndicator = self:CreateTexture(nil, "OVERLAY")
    self.CombatIndicator:SetPoint("CENTER", self, "TOP", 0, 0)
    self.CombatIndicator:SetSize(32, 32)
  end
Code:
local tex = [[Interface\AddOns\bdCore\media\smooth]]
ns.utils.createStatusBar = function (parent)
  local b = CreateFrame("StatusBar", nil, parent)
  b:SetStatusBarTexture(tex, "BORDER")
  b.bg = b:CreateTexture(nil, "BACKGROUND")
  b.bg:SetTexture(tex)
  b.bg:SetAllPoints()
  return b
end
Anyway - any help that you can give me, or hints in the right direction, would be most appreciated.

Thanks
  Reply With Quote
 

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » My CombatIndicator spawns "behind" the frame.

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