From d82fceb51172ab25036bd0afef5a37fdbdc40241 Mon Sep 17 00:00:00 2001 From: Josuan Albin Date: Tue, 24 Oct 2017 20:40:42 +0200 Subject: [PATCH] Make the arsenal layout a bit prettier --- addons/arsenal/data/iconClearContainer.paa | Bin 0 -> 5625 bytes addons/arsenal/functions/fnc_buttonCargo.sqf | 1 - .../functions/fnc_fillLoadoutsList.sqf | 52 +++++++++++------- addons/arsenal/ui/RscAttributes.hpp | 14 ++--- 4 files changed, 40 insertions(+), 27 deletions(-) create mode 100644 addons/arsenal/data/iconClearContainer.paa diff --git a/addons/arsenal/data/iconClearContainer.paa b/addons/arsenal/data/iconClearContainer.paa new file mode 100644 index 0000000000000000000000000000000000000000..cf3ad52815a061e14776a2f644b4751ba256f472 GIT binary patch literal 5625 zcmeI0O=uHA6o6mCrmTmuiRhtdG2n_9k)DKNAqj>g3s!|_us7|kV2oF9p$DZG6H~nv zQc64&de9&_hsK|J^CAc-3f7+Vu$apRM#uLiJDcrN!5~RRcbHA~%e;9r@6Fqtyb1Ai zI&t+vI+suYfH5{F_n{wyf5N)KMe5T2*Bf`0NZ#CR^ku` zKn-@G0p&e?`|SH;zj#Q#ZRFecJ~JmivM6PIBNXwI`O?TAEB1NX+*%fmb~`tXpgX?2 zJZ;`JV|E9ULw)1zh$(&{2G4k6K8M+B5)ke7$FR7?bMvQi^EIiTn>1iqKPYbTrIoFv z?WP=G`e0Zbfr&@Dv67VfwJh9dyVify9D&V>ere6||FG@Xz$hzNrTyFtgaNC=b`%bc zO$bJ@O8pvS7ImzWefxVJ7?wZ$_4ni7fByaVpM1akZ|{H5#QwAD*uNXP0-@3Ee>*1c z#CYd~9KW~!)kn7fdH2_;C*2bNP&g^)v(urw(sRjw`v35g(D!jn>N{H_TC zr|$%R+dj1!EV}+?tLt`-hYDyugEFWSad(03;Cy$Z7HvK!gh{9nWN`qJ2IZ`pl7g<$%-c|z5O}!ggx6E*8BB$ zyLpv$OFEh$$Ez~FthgBaSKRU{sB|nk({1FZ&Mip;Bfu(M{IL2Dq YEr%5}4E?$AZtUxeANe;@O>dEZ0%kx+G5`Po literal 0 HcmV?d00001 diff --git a/addons/arsenal/functions/fnc_buttonCargo.sqf b/addons/arsenal/functions/fnc_buttonCargo.sqf index c9ac485dd9..e6c6880758 100644 --- a/addons/arsenal/functions/fnc_buttonCargo.sqf +++ b/addons/arsenal/functions/fnc_buttonCargo.sqf @@ -65,6 +65,5 @@ switch GVAR(currentLeftPanel) do { (_display displayCtrl IDC_loadIndicatorBar) progressSetPosition _load; (_display displayCtrl IDC_totalWeightText) ctrlSetText (GVAR(center) call EFUNC(movement,getWeight)); // TBL - private _value = {_x == _item} count _items; _ctrlList lnbSetText [[_lnbCurSel, 2],str _value]; \ No newline at end of file diff --git a/addons/arsenal/functions/fnc_fillLoadoutsList.sqf b/addons/arsenal/functions/fnc_fillLoadoutsList.sqf index f23e5857ce..90d7e218a0 100644 --- a/addons/arsenal/functions/fnc_fillLoadoutsList.sqf +++ b/addons/arsenal/functions/fnc_fillLoadoutsList.sqf @@ -14,27 +14,41 @@ private _data = profileNamespace getvariable [QGVAR(saved_loadouts),[]]; if (ctrlIDC _control == IDC_buttonMyLoadouts) then { - { - _x params ["_loadoutName", "_loadoutData"]; - - private _newRow = _contentListCtrl lnbAddRow ["",_loadoutName]; - - _contentListCtrl lnbSetPicture [[_newRow, 2], getText (configFile >> "cfgWeapons" >> ((_loadoutData select 0) select 0) >> "picture")]; - _contentListCtrl lnbSetPicture [[_newRow, 3], getText (configFile >> "cfgWeapons" >> ((_loadoutData select 1) select 0) >> "picture")]; - _contentListCtrl lnbSetPicture [[_newRow, 4], getText (configFile >> "cfgWeapons" >> ((_loadoutData select 2) select 0) >> "picture")]; - _contentListCtrl lnbSetPicture [[_newRow, 5], getText (configFile >> "cfgWeapons" >> ((_loadoutData select 3) select 0) >> "picture")]; - _contentListCtrl lnbSetPicture [[_newRow, 6], getText (configFile >> "cfgWeapons" >> ((_loadoutData select 4) select 0) >> "picture")]; - _contentListCtrl lnbSetPicture [[_newRow, 7], getText (configFile >> "cfgVehicles" >> ((_loadoutData select 5) select 0) >> "picture")]; - _contentListCtrl lnbSetPicture [[_newRow, 8], getText (configFile >> "cfgWeapons" >> (_loadoutData select 6) >> "picture")]; - _contentListCtrl lnbSetPicture [[_newRow, 9], getText (configFile >> "cfgGlasses" >> (_loadoutData select 7) >> "picture")]; - - if (false) then { - _contentListCtrl lnbSetColor [[_newRow, 1], [1, 1, 1, 0.25]]; - _contentListCtrl lbSetValue [_newRow, -1]; - }; - } foreach _data; + } else { }; +switch (ctrlIDC _control) do { + case IDC_buttonMyLoadouts: { + { + _x params ["_loadoutName", "_loadoutData"]; + + private _newRow = _contentListCtrl lnbAddRow ["",_loadoutName]; + + _contentListCtrl lnbSetPicture [[_newRow, 2], getText (configFile >> "cfgWeapons" >> ((_loadoutData select 0) select 0) >> "picture")]; + _contentListCtrl lnbSetPicture [[_newRow, 3], getText (configFile >> "cfgWeapons" >> ((_loadoutData select 1) select 0) >> "picture")]; + _contentListCtrl lnbSetPicture [[_newRow, 4], getText (configFile >> "cfgWeapons" >> ((_loadoutData select 2) select 0) >> "picture")]; + _contentListCtrl lnbSetPicture [[_newRow, 5], getText (configFile >> "cfgWeapons" >> ((_loadoutData select 3) select 0) >> "picture")]; + _contentListCtrl lnbSetPicture [[_newRow, 6], getText (configFile >> "cfgWeapons" >> ((_loadoutData select 4) select 0) >> "picture")]; + _contentListCtrl lnbSetPicture [[_newRow, 7], getText (configFile >> "cfgVehicles" >> ((_loadoutData select 5) select 0) >> "picture")]; + _contentListCtrl lnbSetPicture [[_newRow, 8], getText (configFile >> "cfgWeapons" >> (_loadoutData select 6) >> "picture")]; + _contentListCtrl lnbSetPicture [[_newRow, 9], getText (configFile >> "cfgGlasses" >> (_loadoutData select 7) >> "picture")]; + + if (false) then { + _contentListCtrl lnbSetColor [[_newRow, 1], [1, 1, 1, 0.25]]; + _contentListCtrl lbSetValue [_newRow, -1]; + }; + } foreach _data; + }; + + case IDC_buttonDefaultLoadouts: { + + }; + + case IDC_buttonSharedLoadouts: { + + }; +}; + _contentListCtrl lnbSort [1, false]; \ No newline at end of file diff --git a/addons/arsenal/ui/RscAttributes.hpp b/addons/arsenal/ui/RscAttributes.hpp index 3230ff1b15..ec7f75e45e 100644 --- a/addons/arsenal/ui/RscAttributes.hpp +++ b/addons/arsenal/ui/RscAttributes.hpp @@ -112,14 +112,14 @@ class GVAR(display) { }; class totalWeight: RscControlsGroupNoScrollbars { idc = IDC_totalWeight; - x = QUOTE(safezoneX + 14 * GRID_W); + x = QUOTE(safezoneX + 39 * GRID_W); y = QUOTE(safeZoneH + safezoneY - 9 * GRID_H); w = QUOTE(20 * GRID_W); h = QUOTE(7 * GRID_H); class controls { class totalWeightBackground: ctrlStaticBackground { idc = -1; - colorBackground[] = {0,0,0,0.8}; + colorBackground[] = {0,0,0,0.5}; x = 0; y = 0; w = QUOTE(20 * GRID_W); @@ -151,9 +151,9 @@ class GVAR(display) { }; class menuBar: RscControlsGroupNoScrollbars { idc = IDC_menuBar; - x = QUOTE(safezoneX + safezoneW * 0.50 - 75 * GRID_W); + x = QUOTE((safezoneX + safezoneW * 0.50) - (64.5 * GRID_W)); y = QUOTE(safezoneH + safezoneY - 9 * GRID_H); - w = QUOTE(150 * GRID_W); + w = QUOTE(125 * GRID_W); h = QUOTE(7 * GRID_H); class controls { class buttonHide: ctrlButton { @@ -206,7 +206,7 @@ class GVAR(display) { class infoBox: RscControlsGroupNoScrollbars { idc = IDC_infoBox; fade = 1; - x = QUOTE(safezoneX + safezoneW - 90 * GRID_W); + x = QUOTE(safezoneX + safezoneW - 99 * GRID_W); y = QUOTE(safeZoneH + safezoneY - 17 * GRID_H); w = QUOTE(85 * GRID_W); h = QUOTE(15 * GRID_H); @@ -695,13 +695,13 @@ class GVAR(display) { }; class buttonRemoveAll: ctrlButtonPicture { idc = IDC_buttonRemoveAll; - text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\CargoMisc_ca.paa"; + text= QPATHTOF(data\iconClearContainer.paa); tooltip="Remove all items from the container"; //TBL colorBackground[]={0,0,0,0.5}; onButtonClick = QUOTE(ctrlParent (_this select 0) call FUNC(buttonClearAll)); fade=1; enable=0; - x = QUOTE(safezoneW + safezoneX - 10 * GRID_W); + x = QUOTE(safezoneW + safezoneX - 11 * GRID_W); y = QUOTE(safeZoneH + safezoneY - 33 * GRID_H); w = QUOTE(9 * GRID_W); h = QUOTE(9 * GRID_H);