fix face, voice, insignia in arsenal (#7879)

This commit is contained in:
Brett 2020-08-27 09:37:20 -06:00 committed by GitHub
parent 572e61d1cf
commit 241f1aefbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 32 additions and 23 deletions

View File

@ -9,14 +9,14 @@ class GVAR(sorts) {
class ACE_alphabetically: sortBase { class ACE_alphabetically: sortBase {
scope = 2; scope = 2;
displayName = "$STR_a3_rscdisplayarsenal_sort_alphabet"; displayName = "$STR_a3_rscdisplayarsenal_sort_alphabet";
tabs[] = {{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14}, {0,1,2,3,4,5,6,7}}; tabs[] = {{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17}, {0,1,2,3,4,5,6,7}};
statement = QUOTE({}); statement = QUOTE({});
}; };
class ACE_mod: sortBase { class ACE_mod: sortBase {
scope = 2; scope = 2;
displayName = "$STR_a3_rscdisplayarsenal_sort_mod"; displayName = "$STR_a3_rscdisplayarsenal_sort_mod";
tabs[] = {{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14}, {0,1,2,3,4,5,6,7}}; tabs[] = {{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17}, {0,1,2,3,4,5,6,7}};
statement = QUOTE(_this call FUNC(sortStatement_mod)); statement = QUOTE(_this call FUNC(sortStatement_mod));
}; };

View File

@ -79,7 +79,7 @@
#define IDC_iconBackgroundVoice 2034 #define IDC_iconBackgroundVoice 2034
#define IDC_buttonVoice 2035 #define IDC_buttonVoice 2035
#define IDC_iconBackgroundInsigna 2036 #define IDC_iconBackgroundInsigna 2036
#define IDC_buttonInsigna 2037 #define IDC_buttonInsignia 2037
#define IDC_iconBackgroundOptic 21 #define IDC_iconBackgroundOptic 21
#define IDC_buttonOptic 22 #define IDC_buttonOptic 22
#define IDC_iconBackgroundItemAcc 23 #define IDC_iconBackgroundItemAcc 23

View File

@ -38,7 +38,10 @@ private _sortListLeftPanel = [
[], // GPS 11 [], // GPS 11
[], // Radio 12 [], // Radio 12
[], // Compass 13 [], // Compass 13
[] // Watch 14 [], // Watch 14
[], // Face 15
[], // Voice 16
[] // Insignia 17
]; ];
private _sortListRightPanel = [ private _sortListRightPanel = [

View File

@ -162,7 +162,7 @@ switch true do {
["CfgVoice", configName _x, _ctrlPanel, "icon"] call FUNC(addListBoxItem); ["CfgVoice", configName _x, _ctrlPanel, "icon"] call FUNC(addListBoxItem);
} foreach _voices; } foreach _voices;
}; };
case IDC_buttonInsigna : { case IDC_buttonInsignia : {
{ {
["CfgUnitInsignia", configName _x, _ctrlPanel, "texture"] call FUNC(addListBoxItem); ["CfgUnitInsignia", configName _x, _ctrlPanel, "texture"] call FUNC(addListBoxItem);
} foreach ("true" configClasses (configFile >> "CfgUnitInsignia")); } foreach ("true" configClasses (configFile >> "CfgUnitInsignia"));

View File

@ -60,9 +60,6 @@ private _sorts = if (_rightSort && {GVAR(currentLeftPanel) in [IDC_buttonUniform
} }
) )
}; };
case ([IDC_buttonFace, IDC_buttonVoice, IDC_buttonInsigna] find _idc > -1): {
[]
};
default { default {
GVAR(sortListLeftPanel) select ([ GVAR(sortListLeftPanel) select ([
IDC_buttonPrimaryWeapon, IDC_buttonPrimaryWeapon,
@ -79,7 +76,10 @@ private _sorts = if (_rightSort && {GVAR(currentLeftPanel) in [IDC_buttonUniform
IDC_buttonGPS, IDC_buttonGPS,
IDC_buttonRadio, IDC_buttonRadio,
IDC_buttonCompass, IDC_buttonCompass,
IDC_buttonWatch IDC_buttonWatch,
IDC_buttonFace,
IDC_buttonVoice,
IDC_buttonInsignia
] find _idc) ] find _idc)
}; };
} }

View File

@ -152,7 +152,7 @@ if (!isNil "_itemCfg") then {
if (ctrlIDC _control == IDC_leftTabContent) then { if (ctrlIDC _control == IDC_leftTabContent) then {
if ([IDC_buttonFace, IDC_buttonVoice, IDC_buttonInsigna] find GVAR(currentLeftPanel) > -1) then { if ([IDC_buttonFace, IDC_buttonVoice, IDC_buttonInsignia] find GVAR(currentLeftPanel) > -1) then {
[[1, 2, 3, 4, 5]] call _hideUnusedFnc; [[1, 2, 3, 4, 5]] call _hideUnusedFnc;
_statsBoxCtrl ctrlSetPosition [ _statsBoxCtrl ctrlSetPosition [

View File

@ -288,7 +288,7 @@ if (is3DEN) then {
} forEach [ } forEach [
IDC_buttonFace, IDC_buttonFace,
IDC_buttonVoice, IDC_buttonVoice,
IDC_buttonInsigna IDC_buttonInsignia
]; ];
_buttonCloseCtrl = _display displayCtrl IDC_menuBarClose; _buttonCloseCtrl = _display displayCtrl IDC_menuBarClose;
@ -308,7 +308,7 @@ if (is3DEN) then {
} forEach [ } forEach [
IDC_buttonFace, IDC_buttonFace,
IDC_buttonVoice, IDC_buttonVoice,
IDC_buttonInsigna IDC_buttonInsignia
]; ];
}; };

View File

@ -418,7 +418,7 @@ switch (GVAR(currentLeftPanel)) do {
[_display, _control, _curSel, (configFile >> "CfgVoice" >> _item)] call FUNC(itemInfo); [_display, _control, _curSel, (configFile >> "CfgVoice" >> _item)] call FUNC(itemInfo);
}; };
case IDC_buttonInsigna : { case IDC_buttonInsignia : {
[GVAR(center), _item] call bis_fnc_setUnitInsignia; [GVAR(center), _item] call bis_fnc_setUnitInsignia;
GVAR(currentInsignia) = _item; GVAR(currentInsignia) = _item;

View File

@ -43,7 +43,7 @@ private _nextAction = switch (GVAR(currentLeftPanel)) do {
case IDC_buttonBinoculars : { case IDC_buttonBinoculars : {
["Civil", "Binoculars"] select (GVAR(currentItems) select 9 != "") ["Civil", "Binoculars"] select (GVAR(currentItems) select 9 != "")
}; };
case IDC_buttonInsigna : { case IDC_buttonInsignia : {
"Salute" "Salute"
}; };
case IDC_buttonVoice : { case IDC_buttonVoice : {

View File

@ -56,9 +56,12 @@ if (_rightSort) then {
[ [
_display displayCtrl IDC_leftTabContent, _display displayCtrl IDC_leftTabContent,
switch (GVAR(currentLeftPanel)) do { switch (GVAR(currentLeftPanel)) do {
case IDC_buttonBackpack: { "CfgVehicles" }; case IDC_buttonBackpack: { configFile >> "CfgVehicles" };
case IDC_buttonGoggles: { "CfgGlasses" }; case IDC_buttonGoggles: { configFile >> "CfgGlasses" };
default { "CfgWeapons" }; case IDC_buttonFace: { configFile >> "CfgFaces" >> "Man_A3" };
case IDC_buttonVoice: { configFile >> "CfgVoice" };
case IDC_buttonInsignia: { configFile >> "CfgUnitInsignia" };
default { configFile >> "CfgWeapons" };
}, },
(GVAR(sortListLeftPanel) select ([ (GVAR(sortListLeftPanel) select ([
IDC_buttonPrimaryWeapon, IDC_buttonPrimaryWeapon,
@ -75,7 +78,10 @@ if (_rightSort) then {
IDC_buttonGPS, IDC_buttonGPS,
IDC_buttonRadio, IDC_buttonRadio,
IDC_buttonCompass, IDC_buttonCompass,
IDC_buttonWatch IDC_buttonWatch,
IDC_buttonFace,
IDC_buttonVoice,
IDC_buttonInsignia
] find GVAR(currentLeftPanel))) ] find GVAR(currentLeftPanel)))
] ]
} params ["_panel", "_cfgClass", "_sorts"]; } params ["_panel", "_cfgClass", "_sorts"];
@ -111,7 +117,7 @@ _for do {
} else { } else {
_panel lbData _i _panel lbData _i
}; };
private _itemCfg = configFile >> _cfgClass >> _item; private _itemCfg = _cfgClass >> _item;
private _value = _itemCfg call _statement; private _value = _itemCfg call _statement;
if (_value isEqualType 0) then { if (_value isEqualType 0) then {
_value = [_value, 8] call CBA_fnc_formatNumber; _value = [_value, 8] call CBA_fnc_formatNumber;
@ -134,7 +140,7 @@ if (_right) then {
if (_cursel >= 0) then { if (_cursel >= 0) then {
if (_data == _selected) then {_panel lnbSetCurSelRow _i}; if (_data == _selected) then {_panel lnbSetCurSelRow _i};
}; };
_panel lnbSetText [[_i, 1], getText (configFile >> _cfgClass >> _data >> "displayName")]; _panel lnbSetText [[_i, 1], getText (_cfgClass >> _data >> "displayName")];
}; };
} else { } else {
lbSort [_panel, "ASC"]; lbSort [_panel, "ASC"];
@ -144,6 +150,6 @@ if (_right) then {
if (_cursel >= 0) then { if (_cursel >= 0) then {
if (_data == _selected) then {_panel lbSetCurSel _i}; if (_data == _selected) then {_panel lbSetCurSel _i};
}; };
_panel lbSetText [_i, getText (configFile >> _cfgClass >> _data >> "displayName")]; _panel lbSetText [_i, getText (_cfgClass >> _data >> "displayName")];
}; };
}; };

View File

@ -753,7 +753,7 @@ class GVAR(display) {
y = QUOTE(170 * GRID_H); y = QUOTE(170 * GRID_H);
}; };
class buttonInsigna: buttonPrimaryWeapon { class buttonInsigna: buttonPrimaryWeapon {
idc = IDC_buttonInsigna; idc = IDC_buttonInsignia;
tooltip="$STR_A3_RscDisplayArsenal_tab_Insignia"; tooltip="$STR_A3_RscDisplayArsenal_tab_Insignia";
text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Insignia_ca.paa"; text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Insignia_ca.paa";
y = QUOTE(170 * GRID_H); y = QUOTE(170 * GRID_H);