Jump to content
Sign in to follow this  
onlygokhan

Disable ESC key while dialog open

Recommended Posts

Dialog opening begining of the mission and when we press any button, that on dialog, dialog closing.

I want to disable ESC key until dialog closed. With this way I want to prevent closing dialog without pressing dialog buttons.

Do you know solution? Thank you..

Share this post


Link to post
Share on other sites

add a DEH and disable the ESC keypress event

i am pretty sure there is a topic explaining this in detail.

so use forum search.

otherwise check the source of A&S ProMode

Share this post


Link to post
Share on other sites

Before or when dialog starts.

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

After progress (you can write it in onbuttonclick)

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

I tried this but it just ignoring menu.. ESC key still closing dialog

Edited by onlygokhan

Share this post


Link to post
Share on other sites

to your new display/dialog - not on main display

Share this post


Link to post
Share on other sites
to your new display/dialog - not on main display

?

is (findDisplay 46) wrong?

Share this post


Link to post
Share on other sites

46 is main display. replace with your dialog's idd

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  

×