Thread Tools Display Modes
Prev Previous Post   Next Post Next
11-16-19, 05:58 AM   #1
Mandraxon
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Jul 2009
Posts: 21
Nameplate modifications (wow original)

Hello all.
Im using a code i found on the web that alows me to adjust nameplate fontsize and also change server Visuals.

Now i want to find a way to
1. change text colour to Always be White
2. move the text offset closer to the nameplate bar (anchor Point)

what is the best way to do this?

Lua Code:
  1. --nameplate font size
  2.  
  3. local f = CreateFrame("Frame")
  4. f:RegisterEvent("PLAYER_LOGIN")
  5. f:SetScript("OnEvent", function()  
  6.  
  7. local function SetFont(obj, optSize)
  8.     local fontName= obj:GetFont()  
  9.     obj:SetFont(fontName,optSize,"THINOUTLINE")
  10. end
  11.  
  12. SetFont(SystemFont_LargeNamePlate,8)
  13. SetFont(SystemFont_NamePlate,8)
  14. SetFont(SystemFont_LargeNamePlateFixed,8)
  15. SetFont(SystemFont_NamePlateFixed,8)
  16.  
  17. end)
  18.  
  19. -- no RealmName on nameplates
  20.  
  21. hooksecurefunc("CompactUnitFrame_UpdateName", function(frame)
  22.     if ShouldShowName(frame) then
  23.         if frame.optionTable.colorNameBySelection then
  24.             frame.name:SetText(GetUnitName(frame.unit))
  25.         end
  26.     end
  27. end)
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Nameplate modifications (wow original)

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