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 / Complete noob question regarding Ink Backgrounds. DBPro

Author
Message
Tobo
19
Years of Service
User Offline
Joined: 12th May 2005
Location:
Posted: 28th Apr 2006 08:39
Wotcha, folks.

Just working my way through the 'Hands On DB' book and have come across a quirk already.

It says using the following code, the word 'Hello' appears in red text with a yellow background. But it doesn't. The background remains black.

ink rgb(255,0,0),rgb(255,255,0)
print "Hello"
wait key
end

I'm using DBPro 5.9

I'll probably never even use this method of displaying text, but I hate moving on until I know what's up!.

Many thanks,

Tobo.
PS. Have searched 'Ink', 'background' etc, no joy.
MartinS
18
Years of Service
User Offline
Joined: 15th Dec 2005
Location: Rochester, NY
Posted: 28th Apr 2006 09:07 Edited at: 28th Apr 2006 09:11
Type out "set text opaque" to the top of your code. So here's what it looks like now:


Hope that helps,
Martin

Coder#05
19
Years of Service
User Offline
Joined: 26th Oct 2005
Location: Denmark
Posted: 29th Apr 2006 23:44
ink foreground,background
hmm wierd here the text is red. (using trail)
did you try using the text command to see if that makes any difrent?
text x,y,string$

Still a noob. easy comes easy goes
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 30th Apr 2006 16:16
yeah basically text background is transparent by default, set text opaque works

life's one big game
spec= 2ghz, 1gb ram, 512mb gpu, directx 9.0c, dbpro and classic
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 30th Apr 2006 16:23 Edited at: 30th Apr 2006 16:25
As far as I am aware, when using the PRINT command, DBC only allows you to set the foreground (ink) colour. The background colour - and in fact all of the other text formatting commands are totally ignored.

Set Text Font, Size and all the other associated commands can be used, but the results can only be seen if you use Text X,Y,String$ to place the text on the screen. Use Print and the only thing that changes is the text colour.

[Edit] Forgot to add that I wasn't sure if this had changed in DBP...

TDK_Man

Login to post a reply

Server time is: 2024-11-26 21:32:12
Your offset time is: 2024-11-26 21:32:12