Hi all,
I'm trying to make a really simple program to write some text on a square, but i'm stuck and wondering if you could help me
I'd like to draw a square, and then position some text on top of it.
//counter - text on a square
SetVirtualResolution( 640, 480 )
x = 300
y = 300
count = 0
txtcounter = createtext("")
settextsize(txtcounter,50)
settextposition(txtcounter,x,y)
settextdepth(txtcounter,0)
do
count = count + 1
drawbox(x-50,y-50,x+50,y+50,makecolor(128,128,128),makecolor(128,128,128),makecolor(128,128,128),makecolor(128,128,128),1)
settextstring(txtcounter,str(count))
Sync()
loop
With this code however, the text is always placed behind the square, even though the text depth is set to 0. I'm guessing it's because the box needs drawing every loop, and draws over the text. Any ideas how I could draw ontop of the square?
Thanks,
Shock.