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 / Escape key question

Author
Message
nruser
17
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 26th May 2008 13:35
I know that is possible to prevent game from exiting on escape kwy with command disable escape key, but is it possible to use this button in game without any problems, except of exiting the game by pressing it?

P3 CPU 500 Mhz, 128 MB RAM, 16 MB VRAM, WinXP.
Almost the best configuration for game development.
Robert The Robot
18
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 26th May 2008 13:42
Yes, you can use the escape key any time you want:

If EscapeKey() = 1 then
YOUR CODE HERE
endif

but this will only work if (as you say) you disable escape key first, or the program will close!

It is said there are 10 types of people in this world - those who understand binary, and those who have friends!
nruser
17
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 27th May 2008 17:20
thanks a lot!

P3 CPU 500 Mhz, 128 MB RAM, 16 MB VRAM, WinXP.
Almost the best configuration for game development.
bergice
18
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 28th May 2008 20:19
Or keystate(1)


Dont delete my sig mods, it is 600X120...
Slash!

Login to post a reply

Server time is: 2025-06-05 21:16:32
Your offset time is: 2025-06-05 21:16:32