mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Return true / false if event was handled so that CBA keybinding doesn't have a reason to complain.
Converted tabs to spaces
This commit is contained in:
parent
4acdfcbd24
commit
3aab62fa7c
@ -26,9 +26,10 @@ if (!hasInterface) exitwith {};
|
||||
false
|
||||
},
|
||||
{
|
||||
if (ACE_time - GVAR(lastOpenedOn) > 0.5) then {
|
||||
if (ACE_time - GVAR(lastOpenedOn) > 0.5) exitWith {
|
||||
[ObjNull] call FUNC(openMenu);
|
||||
};
|
||||
false
|
||||
},
|
||||
[35, [false, false, false]], false, 0] call CBA_fnc_addKeybind;
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
* 0: Target <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
* If action was taken <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [some_player] call ace_medical_menu_openMenu
|
||||
@ -18,16 +18,22 @@
|
||||
params ["_interactionTarget"];
|
||||
|
||||
if (dialog || isNull _interactionTarget) exitwith {
|
||||
disableSerialization;
|
||||
disableSerialization;
|
||||
|
||||
private "_display";
|
||||
_display = uiNamespace getVariable QGVAR(medicalMenu);
|
||||
if (!isNil "_display") then {
|
||||
closeDialog 314412;
|
||||
};
|
||||
private ["_display", "_handled"];
|
||||
_handled = false;
|
||||
_display = uiNamespace getVariable QGVAR(medicalMenu);
|
||||
if (!isNil "_display") then {
|
||||
closeDialog 314412;
|
||||
_handled = true;
|
||||
};
|
||||
|
||||
_handled
|
||||
};
|
||||
|
||||
GVAR(INTERACTION_TARGET) = _interactionTarget;
|
||||
|
||||
createDialog QGVAR(medicalMenu);
|
||||
GVAR(lastOpenedOn) = ACE_time;
|
||||
|
||||
true
|
Loading…
Reference in New Issue
Block a user