ACE3/addons/medical_menu/functions/fnc_openMenu.sqf

40 lines
724 B
Plaintext
Raw Normal View History

/*
* Author: Glowbal
* Open the medical menu for target
*
* Arguments:
* 0: Target <OBJECT>
*
* Return Value:
* If action was taken <BOOL>
2015-08-07 03:37:41 +00:00
*
* Example:
* [some_player] call ace_medical_menu_openMenu
*
* Public: No
*/
2015-08-02 14:56:27 +00:00
#include "script_component.hpp"
2015-08-07 03:37:41 +00:00
params ["_interactionTarget"];
if (dialog || isNull _interactionTarget) exitwith {
disableSerialization;
2015-08-02 14:56:27 +00:00
private ["_display", "_handled"];
_handled = false;
_display = uiNamespace getVariable QGVAR(medicalMenu);
if (!isNil "_display") then {
closeDialog 314412;
_handled = true;
};
2015-08-22 20:33:15 +00:00
_handled
2015-08-02 14:56:27 +00:00
};
GVAR(INTERACTION_TARGET) = _interactionTarget;
2015-08-02 14:56:27 +00:00
createDialog QGVAR(medicalMenu);
GVAR(lastOpenedOn) = ACE_time;
2015-08-22 20:33:15 +00:00
true