Skip to content

Commit

Permalink
Merge pull request #6556 from alganthe/arsenalMissionUnitInsignias
Browse files Browse the repository at this point in the history
Arsenal - Add support for mission defined unit insignias
  • Loading branch information
commy2 authored Sep 3, 2018
2 parents 16a3bd0 + d13641d commit fe17370
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
10 changes: 10 additions & 0 deletions addons/arsenal/functions/fnc_fillLeftPanel.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
};
};
};
Expand Down
9 changes: 8 additions & 1 deletion addons/arsenal/functions/fnc_onSelChangedLeft.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
};
};

Expand Down

0 comments on commit fe17370

Please sign in to comment.