Thread: Z-Perl 2
View Single Post
02-28-16, 11:20 PM   #27
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by ceylina View Post
that raid manager looks really well laid out.

As for the shortening, I don't know the demand for it really. I hate just doing a quick pattern matching because it makes training dummy to be t. dummy but also makes alliance gunship cannon to be a.g.cannon which just comes off as cheap to me. I've played around with breaking long names into tables but where do you draw the line on how to truncate? Do you start wasting resources if you have it start calculating frame width, font size, number of words, etc?

I guess its too much work for too little pay off. Just wishful thinking is all.


The elimination of using the built in raid frame addon modules I think is the key suggestion.
I don't think you have to calculate anything. If you anchor the fontstring topleft-bottomright way, then it will get resized automatically when you resize/scale the parent frame.
Then you just have to shorten fontstrings which returns true for the IsTruncated() call. You just need to avoid endless cycles.

The biggest issue that you don't really have any options which words to shorten smartly, you put the words into a table with their number of letters, and you shorten the longest/shortest/random one. Calculating stuff like letter lengths would be a waste of resources tho, like "MMM" is much wider then "III".
  Reply With Quote