2017-05-31 16:41:53 +00:00
|
|
|
/*
|
|
|
|
* Author: PabstMirror
|
|
|
|
* Handle the escape key being pressed.
|
|
|
|
*
|
|
|
|
* Arguments:
|
2017-09-22 15:33:08 +00:00
|
|
|
* 0: Escape menu display that should be closed <DISPLAY> (default: displayNull)
|
2017-05-31 16:41:53 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
2017-09-22 15:33:08 +00:00
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [display] call ace_interact_menu_fnc_handleEscapeMenu
|
2017-05-31 16:41:53 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
if (GVAR(openedMenuType) < 0) exitWith {};
|
|
|
|
|
|
|
|
params [["_display", displayNull, [displayNull]]];
|
|
|
|
TRACE_2("handleEscapeMenu",_display,isNull _display);
|
|
|
|
|
|
|
|
if (!isNull _display) then {
|
|
|
|
_display closeDisplay 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
GVAR(actionSelected) = false;
|
|
|
|
[GVAR(openedMenuType), false] call FUNC(keyUp);
|