mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
fix MenuClosed event may not fire on menu type replacement
This commit is contained in:
parent
7069cb82c9
commit
a6373e936d
@ -105,6 +105,7 @@ format ["%1 (%2)", (localize LSTRING(SelfInteractKey)), localize ELSTRING(common
|
|||||||
if (_menuBackgroundSetting == 1) exitWith {[QGVAR(menuBackground), true] call EFUNC(common,blurScreen);};
|
if (_menuBackgroundSetting == 1) exitWith {[QGVAR(menuBackground), true] call EFUNC(common,blurScreen);};
|
||||||
if (_menuBackgroundSetting == 2) exitWith {0 cutRsc [QGVAR(menuBackground), "PLAIN", 1, false];};
|
if (_menuBackgroundSetting == 2) exitWith {0 cutRsc [QGVAR(menuBackground), "PLAIN", 1, false];};
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
["ace_interactMenuClosed", {
|
["ace_interactMenuClosed", {
|
||||||
params ["_menuType"];
|
params ["_menuType"];
|
||||||
private _menuBackgroundSetting = [GVAR(menuBackground), GVAR(menuBackgroundSelf)] select _menuType;
|
private _menuBackgroundSetting = [GVAR(menuBackground), GVAR(menuBackgroundSelf)] select _menuType;
|
||||||
|
@ -36,6 +36,12 @@ if (_menuType == 0) then {
|
|||||||
GVAR(keyDownSelfAction) = true;
|
GVAR(keyDownSelfAction) = true;
|
||||||
};
|
};
|
||||||
GVAR(keyDownTime) = diag_tickTime;
|
GVAR(keyDownTime) = diag_tickTime;
|
||||||
|
|
||||||
|
// Raise MenuClosed event whenever one type is replaced with another, because KeyUp code is not guaranteed.
|
||||||
|
if (GVAR(openedMenuType) != -1) then {
|
||||||
|
["ace_interactMenuClosed", [GVAR(openedMenuType)]] call CBA_fnc_localEvent;
|
||||||
|
};
|
||||||
|
|
||||||
GVAR(openedMenuType) = _menuType;
|
GVAR(openedMenuType) = _menuType;
|
||||||
GVAR(lastTimeSearchedActions) = -1000;
|
GVAR(lastTimeSearchedActions) = -1000;
|
||||||
GVAR(ParsedTextCached) = [];
|
GVAR(ParsedTextCached) = [];
|
||||||
|
@ -24,7 +24,7 @@ if (uiNamespace getVariable [QGVAR(cursorMenuOpened),false]) then {
|
|||||||
(findDisplay 91919) closeDisplay 2;
|
(findDisplay 91919) closeDisplay 2;
|
||||||
};
|
};
|
||||||
|
|
||||||
if(GVAR(actionSelected)) then {
|
if (GVAR(actionSelected)) then {
|
||||||
this = GVAR(selectedTarget);
|
this = GVAR(selectedTarget);
|
||||||
|
|
||||||
private _player = ACE_Player;
|
private _player = ACE_Player;
|
||||||
|
Loading…
Reference in New Issue
Block a user