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 / Hmm... I can't use the print command if I use a backdrop. Any help?

Author
Message
PaulC
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location:
Posted: 19th Aug 2004 04:00
When I use a certain backdrop, my print commands are hidden behind it. Is there any way to put my text in the foreground?

Thanks for your help.
someone namedlink
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: Dream Planet
Posted: 19th Aug 2004 04:29
that's not true: the print command prints the input on the background, so when you do paste image, you paste over the input text! all the text is printed on the background!

DIV/DBP-coder
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 19th Aug 2004 05:11
you should print each loop. To have text remain stationary use SET CURSOR command, or TEXT command


DBP_NETLIB_v1.4.3 - 65 FREE Functions * Click Logo
Dot Merix
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Canada
Posted: 19th Aug 2004 05:21
In DBP there is no command to print over sprites is there?

- Merix

Athlon xp 2400+, 512MB Ram, Radeon 9800PRO 128mb
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 19th Aug 2004 06:47
draw sprites first I think

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
PaulC
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location:
Posted: 21st Aug 2004 21:47
Hmm... I think you may be right. I removed the texture and the text still disappears when I set up the scene. I have a brief animation at the start. Will that have any effect?
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 22nd Aug 2004 00:29
From my experience with DBC, there are only two ways really to get the text to come to the front; print it at the end of each loop as suggested before, or print it, grab the image, then paste it as a sprite over the main scene. Personally, I hate it! It drives me crazy each time I have to fool with it. But it appears to be the only reliable way that works.

good luck!
S.

Any truly great code should be indisguishable from magic.
PaulC
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location:
Posted: 22nd Aug 2004 23:36
Right... Well since the text I'm trying to print is the game score, then it's updated at the end of each loop anyway. Using a sprite slows the game down like hell, so I'd rather not do that.

Could you elaborate on the two choices?
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 23rd Aug 2004 01:04
Well, the first is easy...
do
...(all other code)...
set cursor 0, 0
ink rgb(255,255,255),0
print "yada-yaya";score
sync

The second is a pain;
do
...any code...
set cursor 0, 0
ink rgb(255, 255, 255),0
print "yada-yaya";score
get image 9999, 0, 0, 100, 100
sprite 9999, 0, 0, 9999
...any code....
sync

Note that the get image command is the bug-a-boo in that process, in that you must grab a rectangle large enough for your printed data. (That's part of what drives me loco, other than I can't this all in the CLI when I want to.)

But that's the skinny of it. My popup menu system did the same thing, and it seems to work prety well. You can position the sprite or text anywhere on the screen and get the same results, so long as you grab the right part of where you printed.

Optionally, you can use the text command for the set cursor and print operation;

text 0, 0, "yada-yaya "+str$(score)
get image 9999, 0, 0, 100, 100
sprite 9999, 0, 0, 9999

Same difference...

good luck,
S.

Any truly great code should be indisguishable from magic.
PaulC
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location:
Posted: 24th Aug 2004 17:55
Great. Thanks alot. The second method seemed to work fine, although I couldn't get the first one to.

You've been a great help to me.

Login to post a reply

Server time is: 2024-11-27 07:55:18
Your offset time is: 2024-11-27 07:55:18