Title: Snippet: Centered Text Post by: Access_Denied on June 14, 2007, 04:02:57 AM Since
I have to have everything perfect and aligned, this is my favorite
function. Just put this code in your code. But you must be using the
graphics library.
void printTextCentered(int y,char* text,Color color) { auto int length = strlen(text); auto int x = 240 - ((length*8)/2); printTextScreen(x,y,text,color); } |