forums

TNT Basic Forums > Programming Q&A
Text
< Last Thread     Next Thread >
Author
Thread        Post A Reply

10-17-2003 02:30

Posted by:
gee4vee

Location:
San Jose, CA

Find more posts by gee4vee

Is there any command or way to clear text that has been drawn? I'm doing a very basic text interface with simple buttons just to try things out but once the game starts the text stays :)

10-17-2003 03:12

Posted by:
Miles

Location:
Australia

Click Here to Email Miles   Find more posts by Miles

Text is drawn straight to the canvas, so you'd have to use a Fill Rect over it in order to get rid of it. Text Descent, Text Length etc could be useful in working out the exact dimensions over which to fill.

10-17-2003 05:50

Posted by:
Jared

Location:
Houston, TX

Find more posts by Jared

A second method depending on how complicated your background is. Is do a:
'open canvas 1 with the dims of canvas 0
open canvas 1, x_dim_0,y_dim_0

copy canvas 0 to canvas 1
canvas 0
draw text where_x,where_y,"Whatever"
'rest of program here
' when you want to wipe the text off
copy canvas 1 to 0
close canvas 1

Jared

10-17-2003 10:49

Posted by:
Martin

Click Here to Email Martin   Find more posts by Martin

I used to draw an empty text to erase, e.g. " "

11-18-2003 21:00

Posted by:
fjerkon

Location:
Sweden

Find more posts by fjerkon

is there a way to draw a text that has been declared in a float variable?

11-18-2003 22:47

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

Floats are number. If you want to draw it, you'll have to convert it to a string.

String x=as string(your_float)

or

Draw text x,y,as string(your_float)

11-18-2003 23:21

Posted by:
fjerkon

Location:
Sweden

Find more posts by fjerkon

ok! thanks!... but when i draw text.. it gets so damn crispy!.. whats wrong?

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.