fix losing interactions with notepad open (#9282)

This commit is contained in:
Grim 2023-07-23 07:48:53 +03:00 committed by GitHub
parent 52ed0fc6be
commit 1011b963bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,7 +22,15 @@ params ["_menuType"];
if (GVAR(openedMenuType) == _menuType) exitWith {true};
// Conditions: Don't open when editing a text box
private _isTextEditing = (allDisplays findIf {(ctrlType (focusedCtrl _x)) == CT_EDIT}) != -1;
private _focusedTextIndex = allDisplays findIf {(ctrlType (focusedCtrl _x)) == CT_EDIT};
private _isTextEditing = _focusedTextIndex != -1;
// Map's controls remain open and focused despite map not being visible, workaround
if (_isTextEditing) then {
if (ctrlIDD (allDisplays select _focusedTextIndex) == IDD_MAIN_MAP) then {
_isTextEditing = visibleMap;
};
};
// Conditions: canInteract (these don't apply to zeus)
if (