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
|
false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
if (ACE_time - GVAR(lastOpenedOn) > 0.5) then {
|
if (ACE_time - GVAR(lastOpenedOn) > 0.5) exitWith {
|
||||||
[ObjNull] call FUNC(openMenu);
|
[ObjNull] call FUNC(openMenu);
|
||||||
};
|
};
|
||||||
|
false
|
||||||
},
|
},
|
||||||
[35, [false, false, false]], false, 0] call CBA_fnc_addKeybind;
|
[35, [false, false, false]], false, 0] call CBA_fnc_addKeybind;
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* 0: Target <OBJECT>
|
* 0: Target <OBJECT>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* None
|
* If action was taken <BOOL>
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* [some_player] call ace_medical_menu_openMenu
|
* [some_player] call ace_medical_menu_openMenu
|
||||||
@ -20,14 +20,20 @@ params ["_interactionTarget"];
|
|||||||
if (dialog || isNull _interactionTarget) exitwith {
|
if (dialog || isNull _interactionTarget) exitwith {
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
|
|
||||||
private "_display";
|
private ["_display", "_handled"];
|
||||||
|
_handled = false;
|
||||||
_display = uiNamespace getVariable QGVAR(medicalMenu);
|
_display = uiNamespace getVariable QGVAR(medicalMenu);
|
||||||
if (!isNil "_display") then {
|
if (!isNil "_display") then {
|
||||||
closeDialog 314412;
|
closeDialog 314412;
|
||||||
|
_handled = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
_handled
|
||||||
};
|
};
|
||||||
|
|
||||||
GVAR(INTERACTION_TARGET) = _interactionTarget;
|
GVAR(INTERACTION_TARGET) = _interactionTarget;
|
||||||
|
|
||||||
createDialog QGVAR(medicalMenu);
|
createDialog QGVAR(medicalMenu);
|
||||||
GVAR(lastOpenedOn) = ACE_time;
|
GVAR(lastOpenedOn) = ACE_time;
|
||||||
|
|
||||||
|
true
|
Loading…
Reference in New Issue
Block a user