2015-01-11 19:32:51 +00:00
|
|
|
// by commy2
|
|
|
|
|
2015-01-11 23:13:47 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-01-11 19:32:51 +00:00
|
|
|
private ["_object", "_actions", "_dlgInteractionDialog", "_ctrlInteractionDialog", "_index", "_ctrlInteractionDialogIcon"];
|
|
|
|
|
2015-01-11 23:13:47 +00:00
|
|
|
_object = GVAR(Target);
|
|
|
|
_actions = GVAR(Buttons);
|
2015-01-11 19:32:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
disableSerialization;
|
2015-01-11 23:13:47 +00:00
|
|
|
_dlgInteractionDialog = uiNamespace getVariable QGVAR(Dialog);
|
2015-01-11 19:32:51 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
for "_a" from 0 to (_count - 1) do {
|
2015-01-11 23:13:47 +00:00
|
|
|
_action = GVAR(Buttons) select _a;
|
2015-01-11 19:32:51 +00:00
|
|
|
|
|
|
|
_ctrlInteractionDialog = _dlgInteractionDialog displayCtrl (10 + _a);
|
|
|
|
_ctrlInteractionDialog ctrlShow true;
|
|
|
|
_ctrlInteractionDialog ctrlSetText (_action select 0);
|
|
|
|
_ctrlInteractionDialog ctrlEnable (call (_action select 2));
|
|
|
|
};
|
|
|
|
*/
|
|
|
|
|
|
|
|
_ctrlInteractionDialog = _dlgInteractionDialog displayCtrl 3;
|
|
|
|
|
2015-01-11 23:13:47 +00:00
|
|
|
GVAR(MainButton) = "(findDisplay 1713999) closeDisplay 1;";
|
2015-01-11 19:32:51 +00:00
|
|
|
|
|
|
|
if (_object isKindOf "Man") then {
|
2015-01-12 04:20:02 +00:00
|
|
|
_ctrlInteractionDialog ctrlSetText (if (alive _object) then {name _object} else {_object getVariable ["ACE_Name", "Unknown"]});
|
2015-01-11 19:32:51 +00:00
|
|
|
} else {
|
|
|
|
_ctrlInteractionDialog ctrlSetText (getText (configFile >> "CfgVehicles" >> typeOf _object >> "displayName"));
|
|
|
|
};
|
|
|
|
|
|
|
|
for "_index" from 0 to 9 do {
|
|
|
|
_ctrlInteractionDialog = _dlgInteractionDialog displayCtrl (10 + _index);
|
|
|
|
_ctrlInteractionDialog ctrlShow true;
|
|
|
|
|
|
|
|
_ctrlInteractionDialogIcon = _dlgInteractionDialog displayCtrl (20 + _index);
|
|
|
|
|
|
|
|
if (_index < _count) then {
|
2015-01-11 23:13:47 +00:00
|
|
|
_action = GVAR(Buttons) select _index;
|
2015-01-11 19:32:51 +00:00
|
|
|
_ctrlInteractionDialog ctrlSetText (_action select 0);
|
|
|
|
_ctrlInteractionDialog ctrlEnable (call (_action select 2));
|
|
|
|
|
|
|
|
_ctrlInteractionDialogIcon ctrlSetText (_action select 5);
|
|
|
|
} else {
|
|
|
|
_ctrlInteractionDialog ctrlSetText "";
|
|
|
|
_ctrlInteractionDialog ctrlEnable false;
|
|
|
|
|
|
|
|
_ctrlInteractionDialogIcon ctrlSetText "";
|
|
|
|
};
|
|
|
|
};
|