Advertisement
Gr8Boi

preview.sqf

Dec 5th, 2015
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.61 KB | None | 0 0
  1. fnc_preview_weapon =
  2. {
  3.     if (!isNil 'TraderItemList') then
  4.     {
  5.         if (typeName TraderItemList == 'ARRAY') then
  6.         {
  7.             if (count TraderItemList > 0) then
  8.             {
  9.                 _item = (TraderItemList select (lbCurSel 12001) select 0);
  10.                 _status = 'no';
  11.                 if (isClass (configFile >> 'CfgWeapons' >> _item)) then
  12.                 {
  13.                     _status = 'CfgWeapons';
  14.                 };
  15.                 if (isClass (configFile >> 'CfgMagazines' >> _item)) then
  16.                 {
  17.                     _status = 'CfgMagazines';
  18.                 };
  19.                 if (isClass (configFile >> 'CfgVehicles' >> _item)) then
  20.                 {
  21.                     _status = 'CfgVehicles';
  22.                 };
  23.                 if (_status != 'no') then
  24.                 {
  25.                     _pic = (getText (configFile >> _status >> _item >> 'picture'));
  26.                     ['
  27.                         <img size=''5'' image='''+_pic+'''/>
  28.                     ',0,safezoneY+0.01,15,0,0,8406] spawn bis_fnc_dynamicText;
  29.                    
  30.                     _txt = (gettext (configFile >> _status >> _item >> 'Library' >> 'libTextDesc'));
  31.                     ['
  32.                         <t size=''0.4'' font=''TahomaB''>'+_txt+' </t>
  33.                     ',0,0.8 * safezoneH + safezoneY,15,0,0,8407] spawn bis_fnc_dynamicText;
  34.                 };
  35.             };
  36.         };
  37.     };
  38. };
  39. fnc_wait_for_preview_weaponclosed =
  40. {
  41.     disableSerialization;
  42.     waitUntil {uiSleep 0.5;isNull (findDisplay 420420)};
  43.     ['',0,0,0,0,0,8406] spawn bis_fnc_dynamicText;
  44.     ['',0,0,0,0,0,8407] spawn bis_fnc_dynamicText;
  45.     [] spawn fnc_wait_for_preview_weapon;
  46. };
  47. fnc_wait_for_preview_weapon =
  48. {
  49.     disableSerialization;
  50.     waitUntil {uiSleep 0.5;!isNull (findDisplay 420420)};
  51.     _ctrl = (findDisplay 420420) displayCtrl 12001;
  52.     _ctrl ctrlSetEventHandler ['LBSelChanged', 'call fnc_preview_weapon;'];
  53.     [] spawn fnc_wait_for_preview_weaponclosed;
  54. };
  55. [] spawn fnc_wait_for_preview_weapon;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement