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 ME PLZ!

Author
Message
Razarati
20
Years of Service
User Offline
Joined: 26th May 2004
Location:
Posted: 26th May 2004 21:58
I have been making a game but I am stuck at the Main Menu screen. I want to make the Start Game, Options etc clickable but I don't know what code to add.
HELP ME PLZ!
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 26th May 2004 22:30
It's really quite simple, each loop check for a mouse click. If the mouse is clicked get the location of the mouse and compare that with the location and size of the button. If the mouse is inside the button location, perform whatever action you want the button to do. That includes special effects such as highlighting the button text, displaying a 'down' button image, etc.

Most programming is just taking bigger problems and reducing them to simple steps.
--
TAZ

History did not begin with PONG. -- Greg Costikyan

Game Beavers
Razarati
20
Years of Service
User Offline
Joined: 26th May 2004
Location:
Posted: 26th May 2004 23:06
THANKS!
but could someone give me abit of code to start me off. PLZ!
GameKit
21
Years of Service
User Offline
Joined: 6th Mar 2003
Location: USA, Staring Blankly at a Computer
Posted: 27th May 2004 01:20 Edited at: 27th May 2004 01:23
Just like zircher said...
Quote: "Each loop check for a mouse click. If the mouse is clicked get the location of the mouse and compare that with the location and size of the button. If the mouse is inside the button location, perform whatever action you want the button to do."




The X and Y Positions refer to the center of the button...

well... I hope I helped...

Previously known as "Game_Creator".
The question is, why am I talking to myself? ...... And more importantly, why am I waiting for a reply?
Razarati
20
Years of Service
User Offline
Joined: 26th May 2004
Location:
Posted: 27th May 2004 21:01
THANKS! for both your help. Keep them coming PLZ
Razarati
20
Years of Service
User Offline
Joined: 26th May 2004
Location:
Posted: 3rd Jun 2004 14:52
I know its asking alot, but can someone write the code to make a american football game for me PLZ. I am a newbie and I relly want something to help me.

Login to post a reply

Server time is: 2024-09-22 11:14:00
Your offset time is: 2024-09-22 11:14:00