Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI - Improve support of pictures in mission list filter #1651

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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