ACE3/addons/interact_menu/functions/fnc_handleEscapeMenu.sqf
PabstMirror bdab342548 Handle escape menu with toggle iteractMenu (#5144)
* Handle escape menu with toggle iteractMenu

* Work on non-cursor menu

* Close cursor menu if open when switching

* Update fnc_handleEscapeMenu.sqf
2017-05-31 11:41:53 -05:00

26 lines
526 B
Plaintext

/*
* Author: PabstMirror
* Handle the escape key being pressed.
*
* Arguments:
* 0: Escape menu display that should be closed <DISPLAY><OPTIONAL>
*
* Return Value:
* Nothing
*
* 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);