Center Text

Blitz3D Forums/Blitz3D Beginners Area/Center Text

HuNTeD(Posted 2004) [#1]
Insted of using the locate function to move text around the screen, is there a function i can use to have text centerd insted of trying to do it with locate?


Eric(Posted 2004) [#2]
Text x,y,string$,[center x],[center y]
Parameters:
x = starting x coordinate to print text
y = starting y coordinate to print text
string$ = string/text to print
center x = optional; true = center horizontally
center y = optional; true = center vertically

Hope this Helps


BlackD(Posted 2004) [#3]
Graphics 800,600,0,2
Color 100,100,100
Line 0,300,800,300
Line 0,350,800,350
Line 0,400,800,400
Line 400,0,400,600
Color 255,255,255
Text 400,300,"Centered X and Y: Parameters 1,1",1,1
Text 400,350,"Centered Y: Parameters 0,1",0,1
Text 400,400,"Centered X: Parameters 1,0",1,0
WaitKey()
End

Note: This only works with the TEXT command, not PRINT. Grey lines show X and Y of text command.


HuNTeD(Posted 2004) [#4]
ok thanks guys, this helps a ton.