Jump to content
Sign in to follow this  
dragon zen

How to disable ESC when use dialog??

Recommended Posts

Bros:

In my mission, if player press ESC to close the dialog, the game can't continue. So I want to know how to disable ESC when use dialog.

THX

Share this post


Link to post
Share on other sites

Hi,

You sure you want to disable ESC? :butbut:

waitUntil { !isNull (indDisplay 46) };

private ["_noEscKey"];
_noEscKey = (findDisplay 46) displayAddEventHandler ["KeyDown", "if ((_this select 1) == 1) then { true } else { false }"];

waitUntil { _someCondition };

(findDisplay 46) displayRemoveEventHandler ["KeyDown", _noEscKey];

Not tested.

_neo_

Edited by neokika

Share this post


Link to post
Share on other sites

THANKS

Alright, maybe it will be danger to disable ESC. Now I set ESC to run the script which close dialog with other function.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×