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.

DarkBASIC Discussion / INK .. (another question)

Author
Message
The Dream Keeper!
21
Years of Service
User Offline
Joined: 9th Oct 2003
Location: Netherlands! HOLLAND!
Posted: 19th Feb 2004 21:29
Allright.. here my question. To change the colour of the boxes you draw, the text you print etc. you just use the ink rgb command. But now i don't want to change the colour of the text or something. But i want to change the color of the background. How do I do that? Becuase i want to change that boring black into another colour.. i can draw a box.. but does anyone knows a real command or something?

Thanks for any help.

The Dream Keeper! (Dark Dreams)

Bring fun to life!!!!!
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 19th Feb 2004 22:03
Color Backdrop RGB(R,G,B)


We need help! Email us! [email protected]
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 19th Feb 2004 22:46
That's only for 3D based area's... If the backdrop's turned off, then that won't do much.

The INK command has two paramaters, the first being the foreground color ( the color of the text, boxs, etc ) and the second is the background color.

So, say you wanted to write some blue text with a red background, you'd do;



Hope I Helped...
Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Pricey
22
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 20th Feb 2004 13:23
look at my snake game on my site. that it is 2D and i used the backdrop for my background


The Dream Keeper!
21
Years of Service
User Offline
Joined: 9th Oct 2003
Location: Netherlands! HOLLAND!
Posted: 20th Feb 2004 17:12 Edited at: 20th Feb 2004 17:13
Hey Jess,

I tried it.. i wrote : ink RGB(0,255,0), RGB(255,255,128)
print "test.."
. But when i tried it.. i still got an black background and the text colours changed. How does that come:S? CAN SOMEONE HELP ME?!!!!

Bring fun to life!!!!!
andrew11
22
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 20th Feb 2004 18:32 Edited at: 20th Feb 2004 18:33
i dont have DBC, but im sure it works the same as it does in Pro.

Ink statement takes 2 parameters - Foreground and background

The foreground is color of text, lines, etc. Background is the TEXT bacground, not the screen background. If you use [set text opaque], you will see the background color behind the text, and only behind the text.

To change the color of the screen, use CLS

Example:
` Colors background Blue
CLS RGB(0,0,255)

"All programmers are playwrites and all computers are lousy actors" -Anon
The Dream Keeper!
21
Years of Service
User Offline
Joined: 9th Oct 2003
Location: Netherlands! HOLLAND!
Posted: 20th Feb 2004 19:36
That works Thank you!!! Only it clears out the whole screen.. isn't there a way around that?

Thanks,

The Dream Keeper! (Dark Dreams)

Bring fun to life!!!!!
andrew11
22
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 21st Feb 2004 02:48
uhh

i guess you could Draw boxes

Might be slow though



"All programmers are playwrites and all computers are lousy actors" -Anon
The Dream Keeper!
21
Years of Service
User Offline
Joined: 9th Oct 2003
Location: Netherlands! HOLLAND!
Posted: 22nd Feb 2004 13:15
Yeah, but if you draw a box it overlaps everything you already draw. And i don't want that!!! So if you already printed.. and draw stuff to the screen. that box erases it all. Do you know what i mean? So PLEASE does anyone have a solution????!!!

Bring fun to life!!!!!
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 22nd Feb 2004 16:45
I can`t even understand the problem, first you say you want to clear the screen, then you want to clear part of the screen, then you want to clear part of the screen but not remove the text already there???, eh? what?, just EXACTLY what are you wanting to do?, so far I can`t work out what you want since every time you get told how to do it then you decide you want something else, could you make some example screenshots maybe?, or just describe the effect you want.

I have a feeling you don`t actualy want to clear the screen at all but change the current background you have drawn to or something like that, but I don`t want to waste my time replying to be told that isn`t what you want, please formulate the request more clearly.

Mentor.

1: P4 hyperthreading 3ghz, 1gig mem, 2x160gig hd`s, ATI radeon 9800 pro gfx, 6 way surround sound, 2: AMD 1.2ghz, 512mb ram, FX5200 ultra gfx, stereo 16 bit soundblaster, ups.
The Dream Keeper!
21
Years of Service
User Offline
Joined: 9th Oct 2003
Location: Netherlands! HOLLAND!
Posted: 23rd Feb 2004 19:38
Shit.. i can type my message again. Clicked it away by excident. Allright.. I'll explain.. i'm making an painting program and i've got the menu on the left side. Because the menu changes and has to be erased i draw a box there. It looks like everything excepts the painting field (wich is is on the right).

So let's say you draw a little sun and now you want to change the background from black to orange. If i draw a box it erases the whole painting field. If i use CLS INK RGB(100, 100, 100),0 it erases the painting field 2. Hope i have explained my problem now. I've included an screenshot.

Thanks for any help



Bring fun to life!!!!!
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 24th Feb 2004 11:54
What you want to do is create a seperate bitmap, then do all your drawing operations on that instead of on the screen, then you want to get an image from that, and use the transparency flag so that you don't draw the new bitmap's background...

Better explained in code;



Hope I Helped...
Jess.

PS, also, you could use Sprites, one for the background, and one for the foreground, and have the foreground one have transparency for black set to 1 also.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy

Login to post a reply

Server time is: 2025-05-22 16:48:04
Your offset time is: 2025-05-22 16:48:04