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.

DarkBASIC Professional Discussion / Title screen with buttons

Author
Message
Wu dynasty
12
Years of Service
User Offline
Joined: 7th Feb 2013
Location: In a democracy
Posted: 26th Mar 2013 16:09
I am making a game and I would like a menu with buttons that I can click. I would like to have a start game, instructions, credits, and standards addressed (educational game) buttons.
Thanks,
Nathan

You are entering the Wu Dynasty. Boomshakalaka
-Nathan
ShellfishGames
12
Years of Service
User Offline
Joined: 6th Feb 2013
Location:
Posted: 26th Mar 2013 18:11



A very simple button function. Basically all you need is mousex()/mousey() and mouseclick() and some way to display the button - for instance DBPro-drawing commands as in this code, or alternatively an image or sprite that you loaded before.

chafari
Valued Member
19
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 26th Mar 2013 18:13 Edited at: 26th Mar 2013 18:16
Hi Wu dynasty.
There are so many ways to get that...I thing one of the best is get your menu images and make something like this piece of code.Obviously, then you will have to write conditions to be taken to program flow.





@ShellfishGames
Edited

Sorry...I answered at the same time and didnt't see youra example....looks like I copied it ...good example yours !!!

Cheers.

I'm not a grumpy grandpa
Mobiius
Valued Member
22
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 26th Mar 2013 20:20
Search the codebase, I know I created some code which does exactly this.

In fact, since searching might be to difficult, here's the link.
Click here

I live for video games! (And beers, and football, and cars!)
See what I live for here: [url]http:\\www.TeamDefiant.co.uk[/url]

Login to post a reply

Server time is: 2025-05-17 18:21:31
Your offset time is: 2025-05-17 18:21:31