mirror of
https://github.com/acemod/ACE3.git
synced 2025-07-25 21:02:48 +00:00
19 lines
727 B
Plaintext
19 lines
727 B
Plaintext
#include "script_component.hpp"
|
|
#include "..\defines.hpp"
|
|
|
|
params ["_display", "_control"];
|
|
|
|
if !(ctrlEnabled _control) exitWith {};
|
|
|
|
private _data = profileNamespace getVariable [QGVAR(saved_loadouts), []];
|
|
|
|
private _contentPanelCtrl = _display displayCtrl IDC_contentPanel;
|
|
private _contentPanelCursSel = lnbCurSelRow _contentPanelCtrl;
|
|
private _loadoutName = _contentPanelCtrl lnbText [_contentPanelCursSel, 1];
|
|
|
|
_data deleteAt (_data find ((_data select {_x select 0 == _loadoutName}) select 0));
|
|
|
|
_contentPanelCtrl lnbDeleteRow _contentPanelCursSel;
|
|
_contentPanelCtrl lnbSetCurSelRow (_contentPanelCursSel - 1);
|
|
|
|
[(findDisplay IDD_ace_arsenal), format ["Loadout '%1' was deleted", _loadoutName]] call FUNC(message); // TBL |