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 / Transparency

Author
Message
Tiborko
16
Years of Service
User Offline
Joined: 25th Jul 2008
Location: In front of computer
Posted: 27th Oct 2008 23:16
Hello! I have one delicate obstacle in creating simple game... I have to put an image as some sort of skill bar... It is not rectangular, so there is some blank space... I edited this image in photoshop, and i deleted white background, so the background layer is transparent... But when I load that image to dark basic pro, there is white background... Here is the screenshot (I used Silkroad Online's skill bar for testing...)
What I want is invisible white background of skill bar image at the bottom...





Repetitio est mater studiorum!
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 28th Oct 2008 00:35 Edited at: 28th Oct 2008 00:37
if you made the "background" transparent already, save it as 24 bit .png format with alpha channel, then in program, load and paste the image with the transparency flag set to 1.

Load Image "File Name", ImgNum,1
Paste Image ImgNum, 100, 450,1

otherwise, we'll need some more info on how you're handling the image in your program and maybe the image itself to see if there's an issue with it.

Virtual Nomad
AMD XP 1800+ (~1.6 Ghz) / 1.5 GB RAM
ATI Radeon 8700LE 128 MB / Windows XP
Captain IceT
15
Years of Service
User Offline
Joined: 21st Oct 2008
Location: Boat Murdered, and Im still laughing!
Posted: 28th Oct 2008 05:26
Are you displaying the skill bar as a sprite? Try making the background Black instead of White, and then use the SET SPRITE functionality to set the third flag to "1".

Of course, you will need to take great care that there is no black in your skill bar, or that will be transparent to, but you can get around that by using a really, really dark grey.

"Dwarf Fortress has taught me that all the world's problems would be substantially reduced had our parent civilizations never minted more than four stacks of coins."
- DwarfFortressWiki
BlobVanDam
16
Years of Service
User Offline
Joined: 26th Jul 2008
Location: one of Cybertrons moons
Posted: 28th Oct 2008 08:40
Assuming it's a plane 3D object, use the "set object transparency" to enable the alpha channel.
Tiborko
16
Years of Service
User Offline
Joined: 25th Jul 2008
Location: In front of computer
Posted: 29th Oct 2008 12:18
Thank you, thank you, thank you all! I did what virtual nomad said, and got this:

Thank you for help guys!

Repetitio est mater studiorum!
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 29th Oct 2008 21:15
Laboribus vendunt dei nobis omnia bona!

seemed appropriate

Virtual Nomad
AMD XP 1800+ (~1.6 Ghz) / 1.5 GB RAM
ATI Radeon 8700LE 128 MB / Windows XP
Tiborko
16
Years of Service
User Offline
Joined: 25th Jul 2008
Location: In front of computer
Posted: 29th Oct 2008 21:24
Mee Dee :p Tu loquoris latinam :p You speak latin?

Repetitio est mater studiorum!
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 30th Oct 2008 12:51
not since i was a catholic... but i do speak Google-ese!

Virtual Nomad
AMD XP 1800+ (~1.6 Ghz) / 1.5 GB RAM
ATI Radeon 8700LE 128 MB / Windows XP
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 31st Oct 2008 19:05
Just Gotta Add tht Hud looks great

Login to post a reply

Server time is: 2024-09-27 22:33:03
Your offset time is: 2024-09-27 22:33:03