Talkback #1 written by blues_zodiakos on 2004-06-03.
To Center some text horizontally on the screen, you can use the following code.
Example:
// This will center the text "This is a test" in the exact middle of the screen
TextCenter( "This is a test", 0, ImageHeight(screen)/2 );
void TextCenter( string text, int font, int y )
{
int x;
x = TextWidth(text)/2 + ImageWidth(screen)/2;
PrintString(x, y, screen, font, text);
}
Doc Nav |
Your docs |