Nexerade Posted September 22, 2019 Posted September 22, 2019 right now I can change color with context:SetColor(1,1,1,1) but that'll change color for everything, how do I change color for first part of line? something like text="one two ~g~three four ~s~five" so result would be one two three four five Quote I am not silly. My english is just not really great. T_T But I'm learning!
Josh Posted September 22, 2019 Posted September 22, 2019 Write the colors in separate text draws. Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Nexerade Posted September 22, 2019 Author Posted September 22, 2019 but how am I gonna get length I need? If I want one two three four five that means I somehow have to switch color and DrawText second time, but how can I fit it exactly where it should be? What if my text is composed of multiple elements? like texta..textb..textc? Quote I am not silly. My english is just not really great. T_T But I'm learning!
gamecreator Posted September 22, 2019 Posted September 22, 2019 Check out the font commands here: https://www.leadwerks.com/learn?page=API-Reference_Object_Asset_Font There's one called GetTextWidth. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.