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 / Help with menu

Author
Message
DeRaNgEd HaMsTeR
22
Years of Service
User Offline
Joined: 18th Nov 2002
Location:
Posted: 21st Nov 2002 13:13
i got the dbpro demo and i wanted to know if any one could help me out im a little new ta this .
i want a picture to pop up when you run it and i want it if you click or press any button it will take you to my menu screen
The Darthster
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 22nd Nov 2002 00:50
Before your main loop you'll want to load the image,

load image "popup.bmp",1

then put the image on screen

paste image 1,0,0
sync

It helps if the image is the same size as the screen resolution, although if it isn't then you can centre it on the screen and it shouldn't look too bad.
Then to get it to wait for a keypress or mouse click, use this:

while scancode()=0
if mouseclick()>0 then exit
endwhile

Then continue with the menu screen code.
DeRaNgEd HaMsTeR
22
Years of Service
User Offline
Joined: 18th Nov 2002
Location:
Posted: 22nd Nov 2002 04:00
Thank you alot for the help and your time

DeRaNgEd HaMsTeR
22
Years of Service
User Offline
Joined: 18th Nov 2002
Location:
Posted: 22nd Nov 2002 04:06
now i got a bigger problem how do i add sprites to my menu screen so that when i click it starts game or goes to a new menu
also how do i add a wav sound file into Dbpro is it the same as in Dark basic

John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 22nd Nov 2002 14:03
You have to load a bitmap, paste the bitmap, then make a sprite from it. I am using sprites for my battle system, so I can put up some code later today.
As for clicking on it, I would look into mouse coorinates, if, then and while commands as well. Since its almost time to go I cant go into much detail, but I am sure someone would be glad to help you with MOUSE COORDINATES.
I will post up how to make a sprite and position it later tonight, around 2:30 EST.
Just for a general idea for the mouse:
while (the mouse is over your sprite)
if mouseclick()>0 then gosub menu2
endwhile

menu2:
do
menu stuff here
return
loop

also look into functions and arrays.
I hoped this helped
John
RPGamer

Final Fantasy, best series ever made.
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 22nd Nov 2002 14:04
for your .wav problem, dunno about pro, read your commands, if you have them, or read the help file under commands. Research!

RPGamer

Final Fantasy, best series ever made.
DeRaNgEd HaMsTeR
22
Years of Service
User Offline
Joined: 18th Nov 2002
Location:
Posted: 22nd Nov 2002 17:45
thank you also for your time and help rpggamer

John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 23rd Nov 2002 00:36
No prob, now as I promised (which I forgot about) here is how to make a sprite and put it down:


Ok, this will load a bitmap, make it a sprite, set the options of the sprite (see db manual for more info), strech the sprite, and reset and show the sprite. Tested in DBv1.13.
I hope this helps,
RPGamer

Upcoming RPG: Eternal Destiny : Help Wanted!
Http://halbrosproductions.netfirms.com

Login to post a reply

Server time is: 2024-11-23 17:34:48
Your offset time is: 2024-11-23 17:34:48