WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   oUF (Otravi Unit Frames) (https://www.wowinterface.com/forums/forumdisplay.php?f=87)
-   -   ToT Frame disappearing quicker than ToT name (https://www.wowinterface.com/forums/showthread.php?t=56159)

GreyFox777 04-17-18 08:15 AM

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

Quote:

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
Quote:

-- 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):

Quote:

-- 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?


All times are GMT -6. The time now is 06:29 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI