View Single Post
06/23/14, 12:58 PM   #1
SkOODaT
 
SkOODaT's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 58
GetStringWidth() Question

Lua Code:
  1. function OnTargetTest()            
  2. local NSize = ZO_TargetUnitFramereticleoverName:GetStringWidth(GetUnitName("reticleover"))
  3. d(NSize)
  4.                
  5. end
  6.  
  7. EVENT_MANAGER:RegisterForEvent("TargetMaintenance_T", EVENT_RETICLE_TARGET_CHANGED, OnTargetTest)

why does this spit out 49 on a 6 space name lol it seems like its bugged ... i need it to set

***:SetDimensions(NSize,15) for a Name text field

Im looking at an NPC right now with that function the NPC name is "Riina Balen" - 11 Spaces but with the above function its saying its 85?!?!? lol

Last edited by SkOODaT : 06/23/14 at 01:03 PM.
  Reply With Quote