Change loadout deleted / unshared EH name, add said EH to unsharing

This commit is contained in:
Josuan Albin
2017-11-02 18:58:54 +01:00
parent 3d0f14ba7c
commit 82040fabaa
4 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ GVAR(lastSearchTextRight) = "";
_unit setSpeaker _voice;
}] call CBA_fnc_addEventHandler;
[QGVAR(sharedLoadoutDeleted), {
[QGVAR(loadoutUnshared), {
_x params ["_contentPanel" ,"_loadoutName"];
if (!(isNil QGVAR(currentLoadoutsTab)) && {GVAR(currentLoadoutsTab) == IDC_buttonSharedLoadouts}) then {

View File

@ -30,7 +30,7 @@ if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then {
_contentPanelCtrl lnbDeleteRow _contentPanelCursSel;
_contentPanelCtrl lnbSetCurSelRow (_contentPanelCursSel);
[QGVAR(sharedLoadoutDeleted), [_contentPanelCtrl, _loadoutName]] call CBA_fnc_remoteEvent;
[QGVAR(loadoutUnshared), [_contentPanelCtrl, _loadoutName]] call CBA_fnc_remoteEvent;
publicVariable QGVAR(sharedLoadoutsVars);
[(findDisplay IDD_ace_arsenal), format ["Loadout '%1' was unshared", _loadoutName]] call FUNC(message); // TBL

View File

@ -9,7 +9,6 @@ private _contentPanelCtrl = _display displayCtrl IDC_contentPanel;
private _curSel = lnbCurSelRow _contentPanelCtrl;
private _loadoutName = _contentPanelCtrl lnbText [_curSel, 1];
private _loadout = (GVAR(sharedLoadoutsNamespace) getVariable ((_contentPanelCtrl lnbText [_curSel, 0]) + (_contentPanelCtrl lnbText [_curSel, 1]))) select 2;
GVAR(center) setUnitLoadout [[_contentPanelCtrl getVariable _loadoutName, _loadout] select (GVAR(currentLoadoutsTab) == IDC_buttonSharedLoadouts), true];

View File

@ -19,6 +19,7 @@ if (_loadoutIndex > -1) then {
GVAR(sharedLoadoutsVars) = GVAR(sharedLoadoutsVars) - [_loadoutVar];
_contentPanelCtrl lnbSetText [[_contentPanelCursSel, 0], ""];
[QGVAR(loadoutUnshared), [_contentPanelCtrl, _loadoutName]] call CBA_fnc_remoteEvent;
} else {
GVAR(sharedLoadoutsNamespace) setVariable [_loadoutVar, [_profileName ,_loadoutName , _loadoutData], true];