123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|116|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> Centering text on the screen

Tue, 16 Sep 2008, 05:00
LostUser
I've tried to center my text in the middle of the screen, but it never appears to be in the center.



I've tried both Len() and StringWidth() but neither of them seem to display the text where I want it.

Is there a better algorithm to position text?
Tue, 16 Sep 2008, 05:39
Jayenkai
Text x, 3, Upper$(Game_Name$) ,1

Text has 2 additional parameters at the end.

Text X,Y,Txt$, CenterX, CenterY


Or if you're doing it by hand..
lenn=stringwidth(txt$)/2... you need to find the middle, not the full width.

-=-=-
''Load, Next List!''
Tue, 16 Sep 2008, 23:46
LostUser
Ah! Thanks!
Thu, 18 Sep 2008, 12:55
blanko1324
This would go great in the QOTD: Oh Yeah, Duh! thread.

-=-=-
My Twitter