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 / Creating a mouse button menu

Author
Message
JABBER
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Indiana, USA
Posted: 26th Aug 2006 21:43
I've been trying to creat a typical title menu with a mouse cursor and mouse activated buttons, Here's what I've come up with so far, I've loaded three buttons but have only coded one , the single player button--



I'm thinking this is a messing way of doing this( if it'll even work in the end). Could someone show me a cleamer way of coding this? I could upload the media if it would help. Thanks for your time,----JABBER

Retired DEV team member Targetware.net
Retired DEV team memeber BF 1918 MOD
http://hosted.filefront.com/JABBER1975
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 26th Aug 2006 23:53 Edited at: 26th Aug 2006 23:53
that's pretty much how you have to do it, although I'd combine it all into one like this:



Pirates of Port Royale
Live the life of a pirate.
JABBER
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Indiana, USA
Posted: 26th Aug 2006 23:57
right on, thanks Gil Galvanti

Retired DEV team member Targetware.net
Retired DEV team memeber BF 1918 MOD
http://hosted.filefront.com/JABBER1975
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 27th Aug 2006 00:13 Edited at: 27th Aug 2006 00:14
no problem . You could also use a more complicated method that I'm using in an inventory system where you can detect which button is being pressed. First you make an array, like "iconPosition":


and then later you would run through each of them detecting if you were clicking in any of their positions like this:


Pirates of Port Royale
Live the life of a pirate.
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 27th Aug 2006 16:49
It's even better if you put it into a function

JABBER
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Indiana, USA
Posted: 27th Aug 2006 23:53
arrays and functions are above my head right now but, the example codes you've posted are a big help Thanks

Retired DEV team member Targetware.net
Retired DEV team memeber BF 1918 MOD
http://hosted.filefront.com/JABBER1975
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 28th Aug 2006 01:02
Quote: "arrays and functions are above my head right now"


Lol well if you ever want to learn those are the only 2 things that I've written tutorials on :

Arrays Tutorial

Functions Tutorial

If you want to lean, there you go.

JABBER
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Indiana, USA
Posted: 28th Aug 2006 16:27
Thanks Sixity Squares, I'll take a look

Retired DEV team member Targetware.net
Retired DEV team memeber BF 1918 MOD
http://hosted.filefront.com/JABBER1975

Login to post a reply

Server time is: 2024-09-25 07:23:29
Your offset time is: 2024-09-25 07:23:29