//	@file Version: 1.0
//	@file Name: ADP_F_Watch.sqf
//	@file Author: THumbert
//	@file Created: 12/14/2013
//	@file Description: Sets up the Debugging Page of the ADP

disableSerialization;
ctrlEnable [2413, false];
_amount = ADPFade;
sliderSetPosition [1903,(ADPFade * 10)];
_display = findDisplay 6002;
	{
	_ctrl = _display displayctrl _x;
	_ctrl ctrlSetFade _amount;
	_ctrl ctrlCommit 0;
	} forEach [1200,1400,1412,1418,
	1414,1413,1404,1411,1410,1409,
	1403,1401,1402,1408,1407,
	1406,1405,1415,1416,1417,1400,
	1412,1418,9001,9002,9003,9004,
	9005,9006,9007,9008,9009,9010,2,
	2420,2421,2423,2401,2402,2403,
	2404,2409,2414,2405,2410,2415];
	
DebugOpen = true;
ctrlEnable [2420, false];
_WatchArray = [1402,1408,1407,1406,1405,1415,1416,1417];
_ExecArray = [1400,1412,1418];
_idx = 0;
{
	_idx = _idx + 1;
	_MEdit = format ["M%1", _X];
	_TempMEdit = player getVariable [_MEdit, "false"];
	if (typeName _TempMEdit == "Array") then 
		{
			_TMEdit = player getVariable [_MEdit, "false"] select 0;
			if (!(_TMEdit == "false")) then {ctrlSetText [_x, _TMEdit];};
		};
} forEach _WatchArray;

{
	_MEdit = format ["M%1", _x];
	_TMEdit = player getVariable [_MEdit, "false"];
	if (!(_TMEdit == "false")) then {ctrlSetText [_x, _TMEdit];};
} forEach _ExecArray;

while {true} do {
if (!DebugOpen) exitWith {};
[] call ADP_fnc_Watch;
sleep 0.5;
};
