Change font size half way through string.
Okay so i have this function that follows, i want it to change the font size of the guild name when it shows guild names but leave the player font the same size. Is it possible? or do i have to make to separate font strings?
lua Code:
|
Separate.
*blah ... to at least 10 chars |
FontInstance:SetFont("path", height[,"flags"])
fontName, fontHeight, fontFlags = FontInstance:GetFont() Code:
if GuildName then I included the :GetFont() just incase you didnt know the name of your font file, |
Yea but that would still make that whole line height x or height y.
He's having a string of "ToonName of GuildName" when the target is guilded. He was asking if he can have it be "ToonName of GuildName" without using 2 fontstrings. |
oh i see,
well if you dont need to change a middle one like <little Fontstring><Big Fontstring><little Fontstring> then it should be easy to just make a string for the guild and slap it on the end there. |
yea making another string is what i did, why it would have been nice to maintain one string was for positioning reasons. It was a pain in the butt to make the two font strings align proper according to name length and then have it change according to if a guild name is present or not then make it calculate the name and the guild name lengths and position accordingly each time... I found though for gettextwidth and set points that the textwidth is about 3x that of the scaling for setpoint so if you divide the textwidths and use that number for the setpoints it'll align right, or rather always be centered. Or at lest real close to it. this was the end result
edit/note - adding some more math to this and feasibly you could change from small to big to small or any combination or extension of that idea. lua Code:
|
All times are GMT -6. The time now is 10:53 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI