Thread Tools Display Modes
02-14-17, 04:32 PM   #1
Dasteman
A Murloc Raider
 
Dasteman's Avatar
Join Date: Feb 2017
Posts: 8
Font size of the nameplates

I'm using currently a script that I've found on another forum to make text font on the nameplate smaller.
It works but it's applying its effect multiple times after long session in the game.
Text gets so small that you can't read anymore.

Do you know what's wrong with that script?
Lua Code:
  1. local frame = CreateFrame("Frame")
  2.     frame:SetScript("OnEvent", function()
  3.     --big plates with small text
  4.     DefaultCompactNamePlateFrameSetUpOptions.useLargeNameFont=false
  5.     end)
  6.     -- Register for interesting events
  7.     frame:RegisterEvent("PLAYER_ENTERING_WORLD")
  Reply With Quote
02-14-17, 05:17 PM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
The function is running every time you use a portal, take a boat/zeplin, enter/leave a battlegournd, arena, order hall etc.

Lua Code:
  1. local frame = CreateFrame("Frame")
  2.         frame:SetScript("OnEvent", function()
  3.         --big plates with small text
  4.         DefaultCompactNamePlateFrameSetUpOptions.useLargeNameFont=false
  5.         frame:UnregisterAllEvents()
  6.         end)
  7.         -- Register for interesting events
  8.         frame:RegisterEvent("PLAYER_ENTERING_WORLD")

It could probably be done slightly differently but this will stop the multiple calls.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 02-14-17 at 05:19 PM.
  Reply With Quote
02-15-17, 03:23 AM   #3
Dasteman
A Murloc Raider
 
Dasteman's Avatar
Join Date: Feb 2017
Posts: 8
Thank you. Works great now

--
Seems like this script is causing taint the same way as NameplateColor before the update.
It gives "SetTargetClampingInsets" error.
Link to the thread,
http://www.wowinterface.com/forums/s...ad.php?t=55142

Maybe you could take a look at it? I'd really appreciate it

Last edited by Dasteman : 02-15-17 at 05:08 AM.
  Reply With Quote
02-15-17, 11:20 AM   #4
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
Originally Posted by Dasteman View Post
Seems like this script is causing taint the same way as NameplateColor before the update.
It gives "SetTargetClampingInsets" error.

Probably any kind of nameplate taint will trigger the SetTargetClampingInsets error...
  Reply With Quote
02-15-17, 12:47 PM   #5
Miiru
A Flamescale Wyrmkin
 
Miiru's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 138
Maybe this can help you:

Lua Code:
  1. local f = CreateFrame("Frame")
  2. f:RegisterEvent("PLAYER_LOGIN")
  3. f:SetScript("OnEvent", function()  
  4.  
  5. local function SetFont(obj, optSize)
  6.     local fontName= obj:GetFont()  
  7.     obj:SetFont(fontName,optSize,"OUTLINE")
  8. end
  9.  
  10. SetFont(SystemFont_LargeNamePlate,12)
  11. SetFont(SystemFont_NamePlate,12)
  12. SetFont(SystemFont_LargeNamePlateFixed,12)
  13. SetFont(SystemFont_NamePlateFixed,12)
  14.  
  15. end)
__________________
◘◘ Author of MiirGui Texture Pack - [Core] [Blue] [Grey] ◘◘
  Reply With Quote
02-16-17, 01:51 AM   #6
Dasteman
A Murloc Raider
 
Dasteman's Avatar
Join Date: Feb 2017
Posts: 8
That's awesome! Not only works without errors but lets me even set a font size.
Thank you!
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Font size of the nameplates

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