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 / DBP - Drawing on top of sprites

Author
Message
Captain GerBear
18
Years of Service
User Offline
Joined: 9th Jul 2006
Location:
Posted: 24th Jul 2006 00:00
Hey guys and gals, I was wondering if someone could help me out with this. I'm working on the map editing utility for my game, and I want a menu bar at the bottom of the screen, but I can't get the menu to draw on top of the sprites (It's created with the 'box' command)

Additionally, I want to put some sprites on top of it but not others. I've tried the DRAW TO FRONT and DRAW SPRITES FIRST commands, but the former has no effect, and the latter just makes my sprites disappear altogether.

Help? =)
Dream And Death
18
Years of Service
User Offline
Joined: 21st Feb 2006
Location: The circus! Juggling job, kids and DBPro
Posted: 24th Jul 2006 10:06
How about making your menu as a sprite, and using set sprite priority (1 will be the sprite drawn first, and then they will be drawn in sequence as the priority increases)

So,

Set sprites that should be behind to priority 1-4, menu as 5, and those above as 6-10.

Hope that helps!

"You get what everyone gets, you get a lifetime!" - Death, The Sandman Library

First you Dream, then you ... - Neil Gaiman, 2001
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 24th Jul 2006 10:38
Dream And Death is right, you should use a sprite for the menu. In addition to being able to control the Z ordering of the menu with the other sprites, it will be 3D accelerated. Also, you don't have to redraw it every time. You'll notice if you drag the window around all 2D will dissapear while you're doing it. 3D stays on the screen.

You could use a standard 1 pixel sprite and stretch it to the desired size. Or, just build separate menu images. Sprites are just better.


Come see the WIP!
Captain GerBear
18
Years of Service
User Offline
Joined: 9th Jul 2006
Location:
Posted: 24th Jul 2006 18:03
WEll that works, for sure. Still, I was hoping to be able to use a 4color box and modify the corner colors on the fly. No way to do it?
Dream And Death
18
Years of Service
User Offline
Joined: 21st Feb 2006
Location: The circus! Juggling job, kids and DBPro
Posted: 25th Jul 2006 15:03
Ok, make the 4 color box on Bitmap 1+, capture it as an image and use that image on the sprite.

"You get what everyone gets, you get a lifetime!" - Death, The Sandman Library

First you Dream, then you ... - Neil Gaiman, 2001

Login to post a reply

Server time is: 2024-11-27 12:40:04
Your offset time is: 2024-11-27 12:40:04