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 / Text between objects?

Author
Message
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 20th May 2009 17:48
Hello!

As you can see in this picture:



The text is over the mouse. The mouse is a plain object, so is the "open file" box, but the icons (the ones the mouse is beneath) are pasted directly to the screen, and so is the text. How can I print the text behind the mouse, but in front of the box?

TheComet

Peachy, and the Chaos of the Gems

That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 20th May 2009 18:13
assemble it all on an offscreen bitmap, get the image and paste that at 0,0 on bmp 0 (the screen)

so



There are only 10 kinds of people in the world, those who understand binary and those who dont
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 20th May 2009 18:16
I'll try that,thanks, but the "get image" command is slow and goes hard on the processor. Is there a friendlier way?

TheComet

Peachy, and the Chaos of the Gems

BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 20th May 2009 19:10
I believe I remember a Draw to Front/Draw To Back command set. Could try that, or if you make your mouse a Sprite, it will be over everything.

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 20th May 2009 19:33
Yup, BN2's got it - mouse as sprite. From the look of your app, it looks like there is 3d behind your dialog boxes so you probably want to avoid DRAW TO BACK. And if you are using the plane for collision detection - projecting a ray into the screen from it's 3d position, just hide it and position the sprite mouse pointer and it at the same location. You can get the plane's 2d location with OBJECT SCREEN X and OBJECT SCREEN Y .

Enjoy your day.
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 20th May 2009 20:25
@BN2

That would work, but the box is 3d, so the text would draw the the back of that too, and you wouldn't see anything...

@Latch

Is that really the only way? I was trying to avoid using sprites from the beginning, because they slow down a lot... Sprites it is.

The ray casting is maths alone, no object positions...

TheComet

Peachy, and the Chaos of the Gems

BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 20th May 2009 20:28 Edited at: 20th May 2009 20:28
@Actually, couldn't you just use paste image and make you paste it last?

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 20th May 2009 20:31
I know! Thanks BN2! I will use paste image when opening and saving files, and when editing the waypoints I'll use a plain to speed it up.

TheComet

Peachy, and the Chaos of the Gems

Login to post a reply

Server time is: 2025-06-08 09:08:56
Your offset time is: 2025-06-08 09:08:56