2015-03-23 21:08:31 +00:00
|
|
|
/*
|
2015-03-24 04:18:00 +00:00
|
|
|
* Author: esteldunedain
|
2015-03-23 21:08:31 +00:00
|
|
|
* Render a single interaction icon
|
|
|
|
*
|
|
|
|
* Argument:
|
|
|
|
* 0: 2d position <ARRAY>
|
2015-03-23 22:16:10 +00:00
|
|
|
* 1: Icon <STRING>
|
2015-03-23 21:08:31 +00:00
|
|
|
*
|
|
|
|
* Return value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
2015-03-23 22:16:10 +00:00
|
|
|
|
|
|
|
EXPLODE_2_PVT(_this,_sPos,_icon);
|
2015-03-23 21:08:31 +00:00
|
|
|
|
|
|
|
if(GVAR(iconCount) > (count GVAR(iconCtrls))-1) then {
|
2015-03-23 22:16:10 +00:00
|
|
|
_displayNum = [[46, 12] select visibleMap,91919] select (uiNamespace getVariable [QGVAR(cursorMenuOpened),false]);
|
2015-03-23 21:08:31 +00:00
|
|
|
GVAR(iconCtrls) pushBack ((findDisplay _displayNum) ctrlCreate ["RscStructuredText", 54021+GVAR(iconCount)]);
|
|
|
|
};
|
2015-03-23 22:16:10 +00:00
|
|
|
|
|
|
|
private "_ctrl";
|
2015-03-23 21:08:31 +00:00
|
|
|
_ctrl = GVAR(iconCtrls) select GVAR(iconCount);
|
|
|
|
GVAR(iconCount) = GVAR(iconCount) + 1;
|
|
|
|
|
2015-03-24 03:15:22 +00:00
|
|
|
_ctrl ctrlSetStructuredText (parseText format ["<img image='%1' color='#FF0000' size='1.6' align='center'/>", _icon]);
|
|
|
|
_ctrl ctrlSetPosition [(_sPos select 0)-(0.05*SafeZoneW), (_sPos select 1)-(0.014*SafeZoneW), 0.1*SafeZoneW, 0.035*SafeZoneW];
|
2015-03-23 21:08:31 +00:00
|
|
|
//_ctrl ctrlSetBackgroundColor [1, 0, 0, 0.1];
|
|
|
|
_ctrl ctrlCommit 0;
|