Skip to content

Commit

Permalink
UI - Improve support of pictures in mission list filter (#1651)
Browse files Browse the repository at this point in the history
  • Loading branch information
veteran29 committed Mar 28, 2024
1 parent 14ed01e commit 1db1838
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions addons/ui/fnc_initDisplayRemoteMissions.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,10 @@ private _fnc_storeMapMissions = {_this spawn {isNil { // delay a frame
private _value = _ctrlMissions lbValue _i;
private _data = _ctrlMissions lbData _i;
private _color = _ctrlMissions lbColor _i;
private _picture = _ctrlMissions lbPicture _i;
private _pictureRight = _ctrlMissions lbPictureRight _i;

_missions pushBack [_name, _value, _data, _color];
_missions pushBack [_name, _value, _data, _color, _picture, _pictureRight];
};

_ctrlMissions setVariable [QGVAR(missions), _missions];
Expand Down Expand Up @@ -146,14 +148,16 @@ _display setVariable [QFUNC(filter), {
lbClear _ctrlMissions;

{
_x params ["_name", "_value", "_data", "_color"];
_x params ["_name", "_value", "_data", "_color", "_picture", "_pictureRight"];
private _classname = _data splitString "." param [0, ""];

if (toLower _name find _filter != -1 && {_showStockMissions || {!(_classname in _stockMissions)}}) then {
private _index = _ctrlMissions lbAdd _name;
_ctrlMissions lbSetValue [_index, _value];
_ctrlMissions lbSetData [_index, _data];
_ctrlMissions lbSetColor [_index, _color];
_ctrlMissions lbSetPicture [_index, _picture];
_ctrlMissions lbSetPictureRight [_index, _pictureRight];
};
} forEach _missions;

Expand Down

0 comments on commit 1db1838

Please sign in to comment.