end |
end |
|
local function TargetTextUpdate() |
target, tserver = UnitName("mouseovertarget") |
_,tclass = UnitClass("mouseovertarget") |
if target and target ~= UNKNOWN then |
for i=1, GameTooltip:NumLines() do |
local left, right, leftText, rightText |
left = getglobal(GameTooltip:GetName().."TextLeft"..i) |
leftText = left:GetText() |
right = getglobal(GameTooltip:GetName().."TextRight"..i) |
if leftText == "Target:" then |
if db.you and target == player and (tserver == nil or tserver == server) then |
right:SetText("<<YOU>>") |
right:SetTextColor(.9, 0, .1) |
else |
right:SetText(target) |
right:SetTextColor(color[tclass].r,color[tclass].g,color[tclass].b) |
end |
tt:Show() |
targetLine = true |
end |
end |
if targetLine ~= true then |
if db.you and target == player and (tserver == nil or tserver == server) then |
tt:AddDoubleLine("Target:", "<<YOU>>", nil, nil, nil, .9, 0, .1) |
else |
local tcolor = color[tclass] |
tt:AddDoubleLine("Target:", target, nil,nil,nil,tcolor.r,tcolor.g,tcolor.b) |
end |
tt:Show() |
else |
targetLine = false |
end |
end |
end |
|
local function MouseoverTargetUpdate() |
--min width for health text |
if tt:GetWidth() < 125 then |