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 Discussion / MENUS (links)

Author
Message
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 16th Feb 2005 19:05
how do you make it so that when you cick on a 2d image or text it will do something. like open anorther page of a menu.

Basically i am am making a game menu to choose your characters and levels and guns.
Jake Blues
20
Years of Service
User Offline
Joined: 19th Jun 2004
Location: United States
Posted: 16th Feb 2005 20:16
First you have to find the coordinates of the sides of the image. Make it so if the mouse clicks and it's mouse x position is greater then the left side of the box and less then the right side. The mouse y is greater then the top side and less then the bottom side.



The answer to the great question of life, the universe and everything is 42.
P Schnell
20
Years of Service
User Offline
Joined: 13th Feb 2005
Location:
Posted: 16th Feb 2005 20:17
Get the top left and bottom right corners of the screen, and check to see if the mouse is within those coordinates, and if the mouse is clicked, change the image being shown and the variables that accompany that button.

AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 16th Feb 2005 20:34
thanks ill try it

Login to post a reply

Server time is: 2025-05-25 02:10:49
Your offset time is: 2025-05-25 02:10:49