Msypon Posted June 9, 2012 Posted June 9, 2012 (edited) How to put this text on center with color code? DELETED Edited June 9, 2012 by Guest
Guest Guest4401 Posted June 9, 2012 Posted June 9, 2012 You're getting textWidth with the colorcodes which actually has an additional 7 characters. But dxDrawColorText won't show the colorcodes because of which the positioning won't be accurate. You must get the text width without color codes in order to position the text at the exact position when you are using color-codes. Change local textWidth = dxGetTextWidth(text, scale, font) to local textWidth = dxGetTextWidth(text:gsub("#%x%x%x%x%x%x",""), scale, font)
Guest Guest4401 Posted June 9, 2012 Posted June 9, 2012 Thanks thanks dude u are the best :D:D You're welcome.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now