WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Search/Requests (https://www.wowinterface.com/forums/forumdisplay.php?f=6)
-   -   Adding text to default tooltip (https://www.wowinterface.com/forums/showthread.php?t=54161)

melicon 08-08-16 05:57 AM

Adding text to default tooltip
 
Good morning.

I was wondering if it would be possible to add the text (rare) to the default tooltip.

Perhaps adding classcolors to names to....but I am maily concerned with rare mobs.

myrroddin 08-08-16 06:36 AM

http://wow.gamepedia.com/API_GameTooltip_AddLine
Code:

if UnitClassification("mouseover") == "rare" then
    GameTooltip:AddLine("Rare")
end

if UnitIsPlayer("mouseover") then
    local className, class = UnitClass("mouseover")
    local colour = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS[class])
    GameTooltip:AddLine(className, colour.r, colour.g, colour.b)
end


melicon 08-08-16 06:57 AM

Thank you got it working

myrroddin 08-08-16 07:27 AM

Good! If you added or changed something, post your code so others can see the working result. :)


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

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