So I have 25 lines of text with 40 characters per line held in an array of strings, and within that there are control codes which denote a colour which the following chars should be, for example one line may be:
[RED] Hello [BLUE] World
Where Hello must be in red, and World must be in blue. Currently I've gotten to the point where I can read the first code, i.e [RED] (actual control codes are hexadecimal) and using the following line I can highlight it:
TTF_RenderUTF8_Shaded(d->font, array_pointers[i], colors.foreground, colors.background);
Where d->font is the font, array_pointers[i] is that line of text, and the colors are the back/foreground to be set (default black background for all so not a worry. This line will render the entire string red and ignore the second control code.
My question is: is there something I can use/a way which can render specific parts of a string different colors? As far as i know RenderUTF8_Shaded only takes a whole string as an argument.