Thread Tools Display Modes
04-17-18, 08:15 AM   #1
GreyFox777
A Cliff Giant
Join Date: Jan 2017
Posts: 75
ToT Frame disappearing quicker than ToT name

Soo, following trouble i have:

I created a Target of target bar, and all the needed stuff on it, like HP bar, power bar, text strings...

But noticed some strange thing... if no more tot unit exists, the bar goes quickly away, but the stuff goes with a little delay. What could be the issue?

Im thinking i need to anchor all that strings correctly to the frame... but have no idea how

i tried :SetParent(name of the bar), but didn't worked.


For example here is the name stuff

core:createNameString(self, font_big, cfg.fontsize - 1, "THINOUTLINE", 8, 27, "LEFT", 160)
self:Tag(self.Name, '[lumen:reactionname]')
self.Name:SetTextColor(unpack(cfg.colors.health))
Name tag
-- Reaction colored name
tags['lumen:reactionname'] = function(unit)

local playerName = UnitName(unit) or ""
local color
if UnitIsPlayer(unit) then
local class, key = UnitClassBase(unit)
color = key and RAID_CLASS_COLORS[key].colorStr or "ffffffff"
else
local reaction = UnitReaction('target','player') or 5
local col = FACTION_BAR_COLORS[reaction]
color = string.format("ff%02x%02x%02x",col.r*255,col.g*255,col.b*255)
end
return string.format("|c%s%s",color,playerName)
end

events['lumen:reactionname'] = 'UNIT_NAME_UPDATE UNIT_CONNECTION UNIT_ENTERING_VEHICLE UNIT_EXITING_VEHICLE'
Generating the name string (core):

-- Generates the Name String
function core:createNameString(self, font, size, outline, x, y, point, width)
self.Name = core:createFontstring(self.Health, font, size, outline)
-- self.Name:SetPoint(point, self.Health, x, y)

-- self.Name:SetPoint('RIGHT', self, 'LEFT', x, y)
table.insert(self.__elements, function(self, _, unit)
if UnitClassification(unit) == 'elite' or UnitClassification(unit) == 'rareelite' or UnitClassification(unit) == 'rare' then
self.Name:SetPoint(point, self, point, x + 10, y)
else
self.Name:SetPoint(point, self, point, x, y)
end
end)
self.Name:SetJustifyH(point)
self.Name:SetWidth(width)
self.Name:SetHeight(size)
end
Any suggestions?
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » ToT Frame disappearing quicker than ToT name

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