Use FUNC(ctrlSetParsedTextCached) for the selector too. Eliminates glitches

This commit is contained in:
esteldunedain 2015-04-25 10:52:52 -03:00
parent b7763331d6
commit fc49814689

View File

@ -22,14 +22,14 @@ if(GVAR(iconCount) > (count GVAR(iconCtrls))-1) then {
private "_ctrl";
_ctrl = GVAR(iconCtrls) select GVAR(iconCount);
GVAR(iconCount) = GVAR(iconCount) + 1;
if (GVAR(UseListMenu)) then {
_ctrl ctrlSetStructuredText (parseText format ["<img image='%1' color='#FF0000' size='1.6'/>", _icon]);
[_ctrl, GVAR(iconCount), format ["<img image='%1' color='#FF0000' size='1.6'/>", _icon]] call FUNC(ctrlSetParsedTextCached);
_ctrl ctrlSetPosition [(_sPos select 0)-(0.014*SafeZoneW), (_sPos select 1)-(0.014*SafeZoneW), 0.05*SafeZoneW, 0.035*SafeZoneW];
} else {
_ctrl ctrlSetStructuredText (parseText format ["<img image='%1' color='#FF0000' size='1.6' align='center'/>", _icon]);
[_ctrl, GVAR(iconCount), format ["<img image='%1' color='#FF0000' size='1.6' align='center'/>", _icon]] call FUNC(ctrlSetParsedTextCached);
_ctrl ctrlSetPosition [(_sPos select 0)-(0.050*SafeZoneW), (_sPos select 1)-(0.014*SafeZoneW), 0.1*SafeZoneW, 0.035*SafeZoneW];
};
//_ctrl ctrlSetBackgroundColor [1, 0, 0, 0.1];
GVAR(iconCount) = GVAR(iconCount) + 1;
_ctrl ctrlCommit 0;