Rename share button to Unshare when loadout selected is shared

This commit is contained in:
Josuan Albin
2017-11-03 12:01:22 +01:00
parent 32b4588ec5
commit ba3f43204f
2 changed files with 6 additions and 1 deletions

View File

@ -29,4 +29,5 @@ if (_loadoutIndex > -1) then {
[QGVAR(loadoutShared), [_contentPanelCtrl, [_profileName ,_loadoutName , _loadoutData]]] call CBA_fnc_remoteEvent;
};
_control ctrlSetText (["Share", "Unshare"] select ((_contentPanelCtrl lnbText [_contentPanelCursSel, 0]) != "")); // TBL
publicVariable QGVAR(sharedLoadoutsVars);

View File

@ -17,6 +17,8 @@ if (_curSel == -1) exitWith {
_saveButtonCtrl ctrlCommit 0;
};
_shareButtonCtrl ctrlSetText "Share"; // TBL
{
_x ctrlEnable false;
_x ctrlCommit 0;
@ -33,8 +35,10 @@ switch (GVAR(currentLoadoutsTab)) do {
_loadButtonCtrl ctrlEnable true;
_loadButtonCtrl ctrlCommit 0;
_shareButtonCtrl ctrlSetText (["Share", "Unshare"] select ((_control lnbText [_curSel, 0]) != "")); // TBL
{
_x ctrlEnable (_curSel >= 0);
_x ctrlEnable true;
_x ctrlCommit 0;
} foreach [_renameButtonCtrl, _deleteButtonCtrl];