WoWInterface SVN ColoredTooltips

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 9 to Rev 10
    Reverse comparison

Rev 9 → Rev 10

ColoredTooltips/ColoredTooltips.lua
56,7 → 56,7
end
 
function ColoredTooltips_SetBackground()
local __, unit = GameTooltip:GetUnit();
local _, unit = GameTooltip:GetUnit();
 
if(UnitExists(unit) and ColoredTooltips_Config["ENABLE"] == 1) then
local r, g, b = GameTooltip_UnitColor(unit);
98,7 → 98,13
 
if (ColoredTooltips_Config["GUILDLABEL"] == 1) then
local guild = GetGuildInfo(unit);
if (guild) then
local _, realm = UnitName(unit);
if (guild and realm) then
if (GameTooltipTextLeft2:GetText() == guild.."-"..realm and GameTooltipTextLeft2:IsVisible()) then
GameTooltipTextLeft2:Hide();
GameTooltip:AddLine(string.format("<%s>", guild));
end
elseif (guild) then
if (GameTooltipTextLeft2:GetText() == guild and GameTooltipTextLeft2:IsVisible()) then
GameTooltipTextLeft2:Hide();
GameTooltip:AddLine(string.format("<%s>", guild));
120,6 → 126,7
end
 
if (ColoredTooltips_Config["PVPLABEL"] == 1) then
local _, faction = UnitFactionGroup(unit);
for i = 3, 5 do
local tooltipTextLeft = _G["GameTooltipTextLeft"..i];
local originalText = tooltipTextLeft:GetText();
136,6 → 143,19
end
end
end
if (originalText and faction) then
local newText = string.gsub(originalText, faction, "");
if (newText == "") then
tooltipTextLeft:SetText(nil);
tooltipTextLeft:Hide();
-- removes the right line too, which should provide alignment.
local tooltipTextRight = _G["GameTooltipTextRight"..i];
if ( tooltipTextRight ) then
tooltipTextRight:SetText(nil);
tooltipTextRight:Hide();
end
end
end
end
end
 
ColoredTooltips/ColoredTooltips.toc
1,7 → 1,7
## Interface: 50400
## Title: Colored Tooltips
## Notes: Sets tooltip background colors based on targeted unit
## Version: 1.2.7
## Version: 1.2.8
## Author: Kharthus
## SavedVariables: ColoredTooltips_Config
ColoredTooltips.xml