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 / mouse click

Author
Message
homie g dawg
20
Years of Service
User Offline
Joined: 21st Jan 2004
Location: sitting right here infront of the comput
Posted: 27th Jan 2004 05:00
i want to make it so the user dosent have to click on exactly the point 100 100 just around it i am trying to get them to click on a string so if there is an easier command for that please say it

if mouseclick() = 1 and mousex() = 100 and mousey() = 100 then print "it works"

Im not dumb
i prefer the term mentaly challangend
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 27th Jan 2004 05:45
if mouseclick() = 1
if mousex()>90 and mousex()<110
if mousey()>90 and mousey()<110 then print "it works"
endif
endif

not the prettiest thing in the world but it will widen the range

-RUST-
"What the... Mooooooooooo!"
Vasily Zaitsev
20
Years of Service
User Offline
Joined: 25th Jan 2004
Location:
Posted: 27th Jan 2004 06:00
Thanks, i was wondering that too.
jasuk70
21
Years of Service
User Offline
Joined: 3rd Dec 2002
Location: Hemel Hempstead
Posted: 27th Jan 2004 16:12
The sort of thing i'm doing (For a menuing system) is:



The bit that is to do with hi-lighting Text would be something that displayed the text in a different colour, and add an else clause that displays the text in the normal colour if the mouse is not over the text.

I'm trying to knock up a small tutorial based around a menu function in DBPro.

Hope this helps,

Jas
p.s. this code was typed from memory so exuse any typos.
Lord Helmet
21
Years of Service
User Offline
Joined: 30th May 2003
Location:
Posted: 28th Jan 2004 04:50
I'm not sure without my computer but if i remember right <= and >= don't work. Just chang it to if mx>99 instead of if mx>=100 if that is the case.

However I would suguest that in the interests of future programing you get used to making 3d menus using mousemovex and mousemovey to move an object that acts as a cursor, and getcollision (or whatever the comand was) to see what buttons (actualy objects) the cursor object is in.
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 28th Jan 2004 06:14 Edited at: 28th Jan 2004 06:16
Quote: "I'm not sure without my computer but if i remember right <= and >= don't work"


go get your computer, you are not sure.

Quote: "However I would suguest that in the interests of future programing you get used to making 3d menus using mousemovex and mousemovey to move an object that acts as a cursor, and getcollision (or whatever the comand was) to see what buttons (actualy objects) the cursor object is in."


or research Pick Object



-RUST-
"What the... Mooooooooooo!"
jasuk70
21
Years of Service
User Offline
Joined: 3rd Dec 2002
Location: Hemel Hempstead
Posted: 28th Jan 2004 10:52
I'm Quite happy with >= and <= works great for me.
Also This menu system I'm working on is fine for me in 2D, I don't need any 3D menu.

Jas

Login to post a reply

Server time is: 2024-09-21 18:53:27
Your offset time is: 2024-09-21 18:53:27