Merge pull request #6556 from alganthe/arsenalMissionUnitInsignias

Arsenal - Add support for mission defined unit insignias
This commit is contained in:
commy2 2018-09-03 09:51:11 +02:00 committed by GitHub
commit fe1737081c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

View File

@ -162,6 +162,16 @@ switch true do {
{
["CfgUnitInsignia", configName _x, _ctrlPanel, "texture"] call FUNC(addListBoxItem);
} foreach ("true" configClasses (configFile >> "CfgUnitInsignia"));
{
private _displayName = getText (_x >> "displayName");
private _className = configName _x;
private _lbAdd = _ctrlPanel lbAdd _displayName;
_ctrlPanel lbSetData [_lbAdd, _className];
_ctrlPanel lbSetPicture [_lbAdd, getText (_x >> "texture")];
_ctrlPanel lbSetTooltip [_lbAdd, format ["%1\n%2", _displayName, _className]];
} foreach ("true" configClasses (missionConfigFile >> "CfgUnitInsignia"));
};
};
};

View File

@ -412,7 +412,14 @@ switch (GVAR(currentLeftPanel)) do {
call FUNC(showItem);
TOGGLE_RIGHT_PANEL_HIDE
[_display, _control, _curSel, (configFile >> "CfgUnitInsignia" >> _item)] call FUNC(itemInfo);
private _unitInsigniaConfig = (configFile >> "CfgUnitInsignia" >> _item);
if (configName _unitInsigniaConfig isEqualTo "") then {
[_display, _control, _curSel, (missionConfigFile >> "CfgUnitInsignia" >> _item)] call FUNC(itemInfo);
} else {
[_display, _control, _curSel, _unitInsigniaConfig] call FUNC(itemInfo);
};
};
};