Files
DayZ-Epoch/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_getGearItems.sqf
ebaydayz f84140c555 Don't clear buying list on category switch + AdvTrade fixes
The buying list now acts like a shopping cart. It is no longer cleared
when switching between categories or containers. Closing the dialog or
switching to sell mode still clears it.

Also fixed:
- Filter button in sell mode
- Bug where filtering sellable list readded items already moved to
selling list
- Visual price display not clearing when remove all button is used on
buying list
- Gear container picture showing rank instead of portrait in buy mode
- Dialog is no longer closed when trying to sell zero items
- LbCurSel is now reset when the buyable list is cleared
- Category is no longer opened onLbSelChanged. Instead you need to
double click or use the "View" button, so the arrow keys can be used for
selecting too.
2016-07-27 18:40:03 -04:00

28 lines
858 B
Plaintext

/**
* call Z_getBackpackItems
*
* Gets all your items stored in your gear and innitiates the selling list.
**/
private ["_mags","_weaps","_skin","_formattedText","_bag","_bags"];
#include "defines.hpp"
call Z_clearLists;
Z_SellArray = [];
Z_SellableArray = [];
_mags = magazines player;
_weaps = weapons player;
_bag = unitBackpack player;
_bags = if (isNull _bag) then {[]} else {[typeOf _bag]};
_skin = typeOf player;
_pic = getText (configFile >> 'CfgVehicles' >> _skin >> 'portrait');
_formattedText = format [
"<t size='1' align='center' color='#ffffff'>%2</t><br />" +
"<img image='%1' size='3' align='center'/><br />"
, _pic, localize "STR_UI_GEAR"
];
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_CONTAINERINFO) ctrlSetStructuredText parseText _formattedText;
[_weaps,_mags,localize "STR_EPOCH_YOUR_GEAR",_bags] call Z_checkArrayInConfig;