mirror of
https://github.com/acemod/ACE3.git
synced 2025-07-25 21:02:48 +00:00
Improve onSelChangedRight, fix typos in onSelChangedLeft and handleSearchbar
This commit is contained in:
@ -62,7 +62,7 @@ if ((ctrlIDC _control) == IDC_rightSearchbar) then {
|
||||
_rightPanelCtrl lnbSetCurSelRow -1;
|
||||
};
|
||||
|
||||
[_display, nil, nil, (configFile >> "")] call FUNC(itemInfo);
|
||||
[_display, nil, nil, configNull] call FUNC(itemInfo);
|
||||
} else {
|
||||
|
||||
if !(GVAR(lastSearchTextLeft) isEqualTo "" || {(_textString find GVAR(lastSearchTextLeft)) == 0}) then {//don't refill if there is no need
|
||||
@ -88,5 +88,5 @@ if ((ctrlIDC _control) == IDC_rightSearchbar) then {
|
||||
_itemsToGo = _itemsToGo - 1;
|
||||
};
|
||||
_leftPanelCtrl lbSetCurSel -1;
|
||||
[_display, nil, nil, (configFile >> "")] call FUNC(itemInfo);
|
||||
[_display, nil, nil, configNull] call FUNC(itemInfo);
|
||||
};
|
||||
|
@ -183,8 +183,8 @@ switch (GVAR(currentLeftPanel)) do {
|
||||
|
||||
GVAR(center) forceAddUniform _item;
|
||||
|
||||
while {count uniformitems GVAR(center) > 0} do {
|
||||
GVAR(center) removeitemfromuniform (uniformitems GVAR(center) select 0);
|
||||
while {count uniformItems GVAR(center) > 0} do {
|
||||
GVAR(center) removeItemFromUniform (uniformItems GVAR(center) select 0);
|
||||
}; //--- Remove default config contents
|
||||
|
||||
{GVAR(center) addItemtoUniform _x} foreach (GVAR(currentItems) select 15);
|
||||
|
@ -62,76 +62,10 @@ private _fnc_selectItem = {
|
||||
};
|
||||
};
|
||||
|
||||
switch (GVAR(currentRightPanel)) do {
|
||||
[
|
||||
_item,
|
||||
18 + ([IDC_buttonPrimaryWeapon, IDC_buttonSecondaryWeapon, IDC_buttonHandgun] find GVAR(currentLeftPanel)),
|
||||
[IDC_buttonMuzzle, IDC_buttonItemAcc, IDC_buttonOptic, IDC_buttonBipod, IDC_buttonCurrentMag] find GVAR(currentRightPanel)
|
||||
] call _fnc_selectItem;
|
||||
|
||||
case IDC_buttonOptic : {
|
||||
switch (GVAR(CurrentLeftPanel)) do {
|
||||
case IDC_buttonPrimaryWeapon : {
|
||||
[_item, 18, 2] call _fnc_selectItem;
|
||||
};
|
||||
case IDC_buttonSecondaryWeapon : {
|
||||
[_item, 19, 2] call _fnc_selectItem;
|
||||
};
|
||||
case IDC_buttonHandgun : {
|
||||
[_item, 20, 2] call _fnc_selectItem;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
case IDC_buttonItemAcc : {
|
||||
switch (GVAR(CurrentLeftPanel)) do {
|
||||
case IDC_buttonPrimaryWeapon : {
|
||||
[_item, 18, 1] call _fnc_selectItem;
|
||||
};
|
||||
case IDC_buttonSecondaryWeapon : {
|
||||
[_item, 19, 1] call _fnc_selectItem;
|
||||
};
|
||||
case IDC_buttonHandgun : {
|
||||
[_item, 20, 1] call _fnc_selectItem;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
case IDC_buttonMuzzle : {
|
||||
switch (GVAR(CurrentLeftPanel)) do {
|
||||
case IDC_buttonPrimaryWeapon : {
|
||||
[_item, 18, 0] call _fnc_selectItem;
|
||||
};
|
||||
case IDC_buttonSecondaryWeapon : {
|
||||
[_item, 19, 0] call _fnc_selectItem;
|
||||
};
|
||||
case IDC_buttonHandgun : {
|
||||
[_item, 20, 0] call _fnc_selectItem;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
case IDC_buttonBipod : {
|
||||
switch (GVAR(CurrentLeftPanel)) do {
|
||||
case IDC_buttonPrimaryWeapon : {
|
||||
[_item, 18, 3] call _fnc_selectItem;
|
||||
};
|
||||
case IDC_buttonSecondaryWeapon : {
|
||||
[_item, 19, 3] call _fnc_selectItem;
|
||||
};
|
||||
case IDC_buttonHandgun : {
|
||||
[_item, 20, 3] call _fnc_selectItem;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
case IDC_buttonCurrentMag : {
|
||||
switch (GVAR(CurrentLeftPanel)) do {
|
||||
case IDC_buttonPrimaryWeapon : {
|
||||
[_item, 18, 4] call _fnc_selectItem;
|
||||
};
|
||||
case IDC_buttonSecondaryWeapon : {
|
||||
[_item, 19, 4] call _fnc_selectItem;
|
||||
};
|
||||
case IDC_buttonHandgun : {
|
||||
[_item, 20, 4] call _fnc_selectItem;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
(_display displayCtrl IDC_totalWeightText) ctrlSetText (GVAR(center) call EFUNC(movement,getWeight));
|
||||
|
Reference in New Issue
Block a user