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 / Background Image

Author
Message
Techathon
14
Years of Service
User Offline
Joined: 26th Apr 2010
Location:
Posted: 30th May 2010 18:51
Hello, I am currently trying to put a background image for my title page. The image is entitled Title.jpg. I have the buttons and everything, I just need to know how to make an image (1024x1024) take up an entire 2D background.

Don't follow in my footsteps... I often walk into walls
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 30th May 2010 19:15


If you're looking for resizing the image to screen size, then I advise you to search the forum.

Cheers!
Sven B

Techathon
14
Years of Service
User Offline
Joined: 26th Apr 2010
Location:
Posted: 31st May 2010 05:17
It's not working... I still get a black screen. Here is some of my code. I have the image loaded in media.


Don't follow in my footsteps... I often walk into walls
ShaunRW
DBPro Developer
16
Years of Service
User Offline
Joined: 7th Jan 2008
Location: Brisbane, Australia
Posted: 31st May 2010 06:08
Try putting paste image inside the loop.


Also try to indent your code, it makes it easier to read.

Yitzu
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location:
Posted: 10th Jun 2010 04:05 Edited at: 10th Jun 2010 04:05
Its easier if u transform i into a sprite. Sprites r sooooo easy to work with.

Just do this:



and thats all XDDD



And also, i recommend using Png instead of jpg
luskos
17
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 11th Jun 2010 00:59
Using other sprites you probably need to adjust their priority so your background is for sure the one behind every other sprite.

Where there is a will, there is a way.
I often edit my posts, that`s who i am
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 12th Jun 2010 00:38
why not use TEXTURE BACKDROP.

Dark Physics makes any hot drink go cold.
luskos
17
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 12th Jun 2010 01:57
texture backdrop goes down for some reason again as obsolete comand in 7.5 but if he use 7.4 there is no problem.

Where there is a will, there is a way.
I often edit my posts, that`s who i am
Techathon
14
Years of Service
User Offline
Joined: 26th Apr 2010
Location:
Posted: 12th Jun 2010 03:19
Im running 1.0 , I can't get it to update. It says that it is not Valid.

Don't follow in my footsteps... I often walk into walls
Robert The Robot
17
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 12th Jun 2010 13:26
DBPro version 1.0? Are you sure that you aren't running Darkbasic Classic? You can check by running:

If you find that it works, then you're running DBC, not DBPro.

In that case, texture backdrop should work fine, or paste image, but sprites would be better (and you can scale them to fill the entire backdrop):



"I wish I was a spaceman, the fastest guy alive. I'd fly you round the universe, in Fireball XL5..."
Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 14th Jun 2010 03:04
From your code, it looks like you are not using any 3D. If that is the case, then you don't need TEXTURE BACKDROP or to use sprites. Pasting the image should work fine for a background. If it doesn't, then check your path and the image.

Likewise, if you are not using sprites or any 3D, you don't need to put your text display in a loop, you just print it once and it stays up.

Of course, if your button function uses sprites or 3D, then never mind.

Login to post a reply

Server time is: 2024-09-28 18:18:14
Your offset time is: 2024-09-28 18:18:14