Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Center Text
#3
So using his example, you can make a simple SUB to print centered text on the screen:

Code:
DECLARE SUB printc(text AS STRING, y AS INTEGER)
DIM l AS INTEGER
DIM c AS INTEGER

l = LEN(text)     'Get's length of our string
c = l/2

LOCATE y, 40-c
PRINT text
END SUB

*Note: This has not been tested, there may be errors.
quote="Deleter"]judging gameplay, you can adaquately compare quake 4 with pong[/quote]
Reply


Messages In This Thread
Center Text - by Champions_2002 - 05-18-2006, 05:00 PM
Center Text - by phycowelder - 05-18-2006, 05:14 PM
Center Text - by Torahteen - 05-18-2006, 06:50 PM
Center Text - by TheAdventMaster - 05-18-2006, 08:49 PM
Center Text - by Zack - 05-19-2006, 07:14 PM
Center Text - by TheAdventMaster - 05-19-2006, 11:02 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)