QB / QB64 Discussion Forum     RULES     Other Subforums, Links and Downloads    Index of Threads

  << Previous Topic | Next Topic >>Return to Index  

How to Center any text! Nice easy, helpfull program.

April 3 2007 at 9:56 PM
drew  (no login)

CLS
INPUT "TEXT ", TEXT$
A = LEN(TEXT$)
MIDDLE = 78 / 2 - A / 2
LOCATE 23 / 2, MIDDLE : PRINT TEXT$
locate 23 / 2 + 2, middle : PRINT 23 / 2; MIDDLE


'cool huh? Before I made this I always had to guess and check every single text 'that I wanted to center. This helps with intro pages to games and stuff like 'that!


 
 Respond to this message   
AuthorReply
E.K.Virtanen
(no login)

My intro.

April 5 2007, 1:39 AM 

I made this script 2005 or 2006 as intro of one game that never finished.
http://www.ascii-world.com/tiki-read_article.php?articleId=32

 
 Respond to this message   
E.K.Virtanen
(no login)

forgot.

April 5 2007, 1:40 AM 

There should be some delay function before "Next y" so letters comes out one by one, like typing.

 
 Respond to this message   
roy
(no login)

Do not worry about it

April 5 2007, 7:22 AM 

I am just glad to see the likes of you and Laanan Fisher visiting these forums, it is just a pity that we have lost others.

 
 Respond to this message   
E.K.Virtanen
(no login)

I visit here daily.

April 5 2007, 2:21 PM 

But i mostly keep my mouth shut since i seem to be somesort of trigger for someones ;)

 
 Respond to this message   
roy
(no login)

*I think someones have gone but YOU may get them back. lol

April 6 2007, 5:52 AM 


 
 Respond to this message   

(no login)

nah...

April 10 2007, 10:45 AM 

i enjoy of the silence.

 
 Respond to this message   
Current Topic - How to Center any text! Nice easy, helpfull program.
  << Previous Topic | Next Topic >>Return to Index