Text variety?

Blitz3D Forums/Blitz3D Beginners Area/Text variety?

wgkspeak(Posted 2004) [#1]
I'm trying to create dialouge using an image to hold the text. Not Gui. I seem to get the first text on the screen, but I either see the next series of text on top of the first, or the first just disappears. Can someone tell me whether I should be using a type or file or give me a hint on what might make my variables call and 'print to screen' the proper text?
uhg


semar(Posted 2004) [#2]
Basically you have to do 4 steps in your main loop:
---- main loop
1) clear the screen
2) draw the background image
3) draw the text on the image at x,y position
4) show the screen content
---- end main loop

the above 'pseudo code' can be translated with:
graphics 640,480,0,2 ;640 X 480 windowed mode

your_msg$ = "Hello World"

while not keydown(1) ;until ESC is pressed

cls ;clear the screen

drawimage your_background,50,50 ;draw the background image at 50,50

text 100,100,your_msg ;draw text at 100,100

flip ;show the screen buffer content

wend ;end main loop

end ;end program


Hope this has sense for you,
Sergio.


wgkspeak(Posted 2004) [#3]
Thanks Sergio, I'll try that. I tried using the cls command and it does allow me to flip the pages in my dialouge, but it also erases the entire background screen. Not good. Maybe I did some thing wrong. thanks for pointing me in 'a' direction though. I'll try coding in a way to redraw the entire backbuffer as well....