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 / Cant click a button.

Author
Message
Eminent
14
Years of Service
User Offline
Joined: 15th Jul 2010
Location:
Posted: 3rd Aug 2010 05:49
I made a few buttons for a game I made a few weeks ago and cant seem to get the green button to work properly. Dont mind the Press A/H/S to do whatever. I havent removed that part of the code yet.
The Click thing is in the GUI subfunction.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 3rd Aug 2010 12:57 Edited at: 3rd Aug 2010 13:00
it now works.

What was worng, well it was thess lines

when you turn the back into real numbers you get

790,320,600,400

which when you put them into mousewithin, they were back to front what you should have had is 600,320,790,400 which when put in direct it works.

plus trying to using screen width() for height is asking for trouble.

when you have it going re write it using things you've learned along the way it will come out better and smaller code.



Dark Physics makes any hot drink go cold.
Daygamer
14
Years of Service
User Offline
Joined: 16th Mar 2010
Location: United States
Posted: 3rd Aug 2010 17:48
Fun Program, by the way, Eminent.

Coding is just better with music (preferably Owl City!)
Have a nice day, God Bless You!
Eminent
14
Years of Service
User Offline
Joined: 15th Jul 2010
Location:
Posted: 3rd Aug 2010 18:02 Edited at: 3rd Aug 2010 18:07
Thanks HowDo and Daygamer. I'm thinking of rewriting it into a small 3D battle. But only If I can figure out how to work trueSpace or Blender.
BTW, HowDo, what screen res do you use?
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 3rd Aug 2010 18:34
800 by 600 that what my ide is set to.

Dark Physics makes any hot drink go cold.

Login to post a reply

Server time is: 2024-11-23 11:10:25
Your offset time is: 2024-11-23 11:10:25