Make the arsenal layout a bit prettier

This commit is contained in:
Josuan Albin
2017-10-24 20:40:42 +02:00
parent e294e0b178
commit d82fceb511
4 changed files with 40 additions and 27 deletions

Binary file not shown.

View File

@ -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];

View File

@ -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];

View File

@ -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);