2015-10-12 19:15:10 +00:00
|
|
|
/*
|
2016-04-08 20:21:46 +00:00
|
|
|
Author: Raimonds Virtoss - EpochMod.com
|
|
|
|
|
|
|
|
Contributors: Aaron Clark
|
|
|
|
|
|
|
|
Description:
|
2015-10-12 19:15:10 +00:00
|
|
|
Used to register and unregister IDC used in dynamic menus.
|
|
|
|
Pass the control to unregister or just call fnc to get a unique IDC
|
2016-04-08 20:21:46 +00:00
|
|
|
|
|
|
|
Licence:
|
|
|
|
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
|
|
|
|
|
|
|
|
Github:
|
2016-06-13 16:54:19 +00:00
|
|
|
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/gui/scripts/Epoch_getIDC.sqf
|
2015-10-12 19:15:10 +00:00
|
|
|
*/
|
2016-09-01 00:29:08 +00:00
|
|
|
//[[[cog import generate_private_arrays ]]]
|
|
|
|
private ["_find","_in","_list","_out"];
|
|
|
|
//[[[end]]]
|
2015-12-07 16:24:52 +00:00
|
|
|
_in = [_this, 0, controlNull, [controlNull]] call BIS_fnc_param;
|
|
|
|
|
2015-10-28 15:16:00 +00:00
|
|
|
_list = missionNamespace getVariable ["rmx_var_uniqueIDC",[]];
|
2015-10-12 19:15:10 +00:00
|
|
|
|
|
|
|
if (ctrlIDC _in isEqualTo -1) then {
|
|
|
|
_out = -90000 - (count _list);
|
|
|
|
_list pushBack _out;
|
|
|
|
} else {
|
|
|
|
_find = _list find (ctrlIDC _in);
|
|
|
|
_list deleteAt _find;
|
|
|
|
_out = true;
|
|
|
|
};
|
2015-10-28 15:16:00 +00:00
|
|
|
missionNamespace setVariable ["rmx_var_uniqueIDC",_list];
|
2015-10-12 19:15:10 +00:00
|
|
|
|
|
|
|
_out
|