Thread Tools Display Modes
06-28-09, 01:42 PM   #1
Retraluna
A Murloc Raider
 
Retraluna's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2009
Posts: 9
Names

Hi!

In my layout the names are sometimes too long and the nametext and the healthtext stack.

How can i make the name max. 10 letters long (or any other number) ?

lg luna
  Reply With Quote
06-28-09, 02:27 PM   #2
jadakren
A Flamescale Wyrmkin
 
jadakren's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2007
Posts: 103
Originally Posted by Retraluna View Post
Hi!

In my layout the names are sometimes too long and the nametext and the healthtext stack.

How can i make the name max. 10 letters long (or any other number) ?

lg luna
http://lua-users.org/wiki/StringLibraryTutorial
  Reply With Quote
06-28-09, 02:51 PM   #3
Freebaser
A Molten Kobold Bandit
 
Freebaser's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 135
You can also give the font string Height/Width to cut it off and creating a "..."

example
Code:
self.Name:SetHeight(fontsize)
self.Name:SetWidth(150)
  Reply With Quote
06-28-09, 03:48 PM   #4
v6o
An Onyxian Warder
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 399
I think most people anchor the RIGHT point of the Name text to the to LEFT point of Health text to make names get truncated.

Ofcourse you'd have to change LEFT/RIGHT depending on which side meets up.
__________________
I stopped playing back World of Warcraft in 2010 and I have no plans on returning.
This is a dead account and if you want to continue any of my addons or make a fork then feel free to do so.
This is your permission slip.

If you need to contact me, do so on Twitter @v6ooo

Best regards, v6.

Last edited by v6o : 06-28-09 at 04:00 PM.
  Reply With Quote
06-30-09, 03:24 PM   #5
Tekkub
A Molten Giant
 
Tekkub's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 960
Originally Posted by Yourstruly View Post
I think most people anchor the RIGHT point of the Name text to the to LEFT point of Health text to make names get truncated.
Simple solutions are always the best.
__________________
I have reached enlightment.
Thank you bacon!
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Names


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