PDA

View Full Version : text formating?


Kromar
11-24-2007, 06:50 PM
i have an array with a long text in it and i have no idea how i can format the text so its not a wall of text.
can this be done in an array or is there a other/better way to make that?

example:

ShaderInfo[] = {
"Cloak shader extension used by the editor for automatic shader generation (based on Cloak shader template) BUMP_MAP (Bump map) Use bump-map texture GLOSS_MAP (Gloss map) Use gloss map as separate texture" };


and it should look like this:
Cloak shader extension used by the editor for automatic shader generation (based on Cloak shader template)

- BUMP_MAP (Bump map)
Use bump-map texture
- GLOSS_MAP (Gloss map)
Use gloss map as separate texture

GennadiyKorol
11-25-2007, 05:59 PM
You mean formatting for printing, like adding "new line" characters and such?

string $formated = "The fist line.\nAnd another line!\n\nThe last but not the least, the third line.";

print $formated;

CGTalk Moderation
11-25-2007, 05:59 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.