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 / Odd Background problem

Author
Message
Techathon
14
Years of Service
User Offline
Joined: 26th Apr 2010
Location:
Posted: 11th Sep 2010 22:12 Edited at: 11th Sep 2010 22:46
Ok, so I am having problems with my background bitmap for my title. It loads fine, kind of. The image is WAY too big in my screen. What do I do?


EDIT: Ok, I just realized I forgot to set display mode problem solved

Ever want to take part in the best game series ever to grace Geek Culture? Then join the Nation Fourm Game.
Current Game: NFG: Peak of Confusion
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 11th Sep 2010 23:02 Edited at: 12th Sep 2010 03:02
while the code you provided is incomplete, you should take a look at texture backdrop, assuming your version of dbpro is current as the command was once removed and recently returned to use (it's still showing as "obsolete").

that's about the easiest way to use an image for a background since it will automatically resize the image to fit whatever screen/window size (technically it functions very similarly to the paste sprite command with an implied scale sprite function. pretty sure my initial tests on paste sprite vs texture backdrop showed the same performance "hit", so...). of course, if the "background" also holds your "buttons", you'll need to account for various screen sizes and develop some dynamic "button" code to account for it. ie, if your buttons are at a certain x,y position based on 1 screen resolution, you'll do well to incorporate an x & y scale/ratio to your button checks. using your code and, say, a standard screen resolution of 800x600, something like this pseudocode:



that won't work verbatim with you what're doing since i dunno what the rest of your button functionality might be doing, but it does give you the idea.

good luck

add: added # signs to the ratio/scale multipliers of the pseudocode.

Virtual Nomad @ California, USA . DBPro V7.5
AMD Phenomâ„¢ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit

Login to post a reply

Server time is: 2024-09-28 22:34:04
Your offset time is: 2024-09-28 22:34:04