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 / Click Text Like a link

Author
Message
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 26th Jul 2008 20:48
Is it possible in DBpro , to have inputs like a link, so that if text is clicked, it would do something?
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 26th Jul 2008 21:06
Yes, it is. All you'd need to do is check to see if the mouse is within the area of the text, and then check if the user clicks the mouse. Then you simple do whatever it is you want to do. This would require the following commands:

MouseX()
MouseY()
Text Width( String )
Text Height(String )
Mouseclick()

And these commands you are probably already going to be using:

TEXT
DO
LOOP
IF
ENDIF

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 29th Jul 2008 16:19
Thanks that helps me alot
Ed222
16
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: Calgary
Posted: 30th Jul 2008 05:00 Edited at: 30th Jul 2008 05:01
don't forget execute file
e.g.


Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 30th Jul 2008 05:26
Quote: "don't forget execute file"


Yup if he wanted to create a link, he would probably need that. Good point .

Quote: "inputs like a link, so that if text is clicked, it would do something? "


But he never did specify what he wanted the text to do

nackidno
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Där solen aldrig skiner
Posted: 30th Jul 2008 14:26
That could everything from clicking a text to actually start the game, or opening a website.

- Elias, Damezean, Nackidno, Wonderboy

AntocGames - http://antocgames.se.nu/
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 30th Jul 2008 19:39
Yeah it was actually just to advance in the game, like click HERE to continue

Thanks anyway Ed222

Login to post a reply

Server time is: 2024-09-27 18:18:50
Your offset time is: 2024-09-27 18:18:50