Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Need idea for screen text storage

Author
Message
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 2nd Jun 2007 01:03
I'm working on a text program translation. I want to keep the backdrop on and colored,and I want the text to remain on top.

The text gets erased at the sync. I need to refresh the text in the loop but I don't want to cycle through all the string arrays each loop. I need to control the text columns and rows anyway so keeping a TextWindow buffer is needed regardless.

Q. What is the best way to store and retrieve/display on-screen text?

My 3 guesses are...

1. A 2D ScreenStr$(row,col) array; each position storing a char.
2. Using Pointers.
3. A memblock.

Is my logic right? Which one would be best?

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 2nd Jun 2007 05:34 Edited at: 2nd Jun 2007 08:27
if you trap all the text to the screen by making it a graphic and pasting it to a 3d panel, it wont dissapear with sync. you can even make it look exactly like text with this method but gain all the 3d features etc.. Ive posted a 3d panel code for that in the snippets.
that method also reduces text calls every loop, only when the graphic is updated, very efficient.

you might need to adapt a text scrolling buffer with that method as well
something akin to this.



zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 2nd Jun 2007 13:58
Thanks indi. I'm not sure if the text game competition will allow me to do that under the current rules. But I'll look into it. I think your approach puts my ideas to sleep. So I'll consult with Matt.

Login to post a reply

Server time is: 2024-11-25 17:56:02
Your offset time is: 2024-11-25 17:56:02