diff --git a/addons/arsenal/functions/fnc_buttonLoadoutsSave.sqf b/addons/arsenal/functions/fnc_buttonLoadoutsSave.sqf index 78e02431a43..17c89b5f363 100644 --- a/addons/arsenal/functions/fnc_buttonLoadoutsSave.sqf +++ b/addons/arsenal/functions/fnc_buttonLoadoutsSave.sqf @@ -124,7 +124,17 @@ switch (GVAR(currentLoadoutsTab)) do { }; }; - if (_loadoutIndex == -1) then { + if (GVAR(shiftState) && {is3DEN} && {!(_loadoutName isEqualTo "")} && {_cursSelRow != -1} && {!(_loadoutIndex isEqualto -1)}) exitwith { + private _defaultLoadoutsSearch = GVAR(defaultLoadoutsList) findIf {(_x select 0) == _loadoutName}; + if (_defaultLoadoutsSearch isEqualto -1) then { + GVAR(defaultLoadoutsList) pushBack [_loadoutName, _curSelLoadout]; + } else { + GVAR(defaultLoadoutsList) set [_defaultLoadoutsSearch , [ _loadoutName, _curSelLoadout]]; + }; + set3DENMissionAttributes [[QGVAR(DummyCategory), QGVAR(DefaultLoadoutsListAttribute), GVAR(defaultLoadoutsList)]]; + }; + + if (_loadoutIndex isEqualto -1) then { _data pushBack [_editBoxContent, _loadout]; } else { _data set [_loadoutIndex, [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _loadout]]; diff --git a/addons/arsenal/functions/fnc_loadoutsChangeTab.sqf b/addons/arsenal/functions/fnc_loadoutsChangeTab.sqf index df5d8a58044..220cb697f27 100644 --- a/addons/arsenal/functions/fnc_loadoutsChangeTab.sqf +++ b/addons/arsenal/functions/fnc_loadoutsChangeTab.sqf @@ -48,6 +48,7 @@ switch (ctrlIDC _control) do { case IDC_buttonMyLoadouts: { _centerBoxTitleCtrl ctrlSetText (localize LSTRING(tabMyLoadoutsText)); + if (is3den) then { _saveButtonCtrl ctrlSetTooltip format ["%1\n%2", localize LSTRING(buttonSaveTooltip), localize LSTRING(buttonSaveTooltip_shiftClick)]; }; _saveButtonCtrl ctrlEnable true; _saveButtonCtrl ctrlCommit 0; }; @@ -55,6 +56,7 @@ switch (ctrlIDC _control) do { case IDC_buttonDefaultLoadouts: { _centerBoxTitleCtrl ctrlSetText (localize LSTRING(tabDefaultLoadoutsText)); + if (is3den) then { _saveButtonCtrl ctrlSetTooltip localize LSTRING(buttonSaveTooltip); }; _saveButtonCtrl ctrlEnable (is3DEN); _saveButtonCtrl ctrlCommit 0; }; @@ -62,6 +64,7 @@ switch (ctrlIDC _control) do { case IDC_buttonSharedLoadouts: { _centerBoxTitleCtrl ctrlSetText (localize LSTRING(tabSharedLoadoutsText)); + if (is3den) then { _saveButtonCtrl ctrlSetTooltip localize LSTRING(buttonSaveTooltip); }; _saveButtonCtrl ctrlEnable false; _saveButtonCtrl ctrlCommit 0; }; diff --git a/addons/arsenal/stringtable.xml b/addons/arsenal/stringtable.xml index 55860165f27..0274a68cfa8 100644 --- a/addons/arsenal/stringtable.xml +++ b/addons/arsenal/stringtable.xml @@ -100,6 +100,9 @@ 保存當前的裝備 保存当前的装备 + + [Shift+Click to save to mission defaults] + Rename Renommer