ACE3/addons/arsenal/functions/fnc_attributeMode.sqf
jonpas 742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00

30 lines
800 B
Plaintext

#include "..\script_component.hpp"
#include "..\defines.hpp"
/*
* Author: mharis001
* Handles changing the mode in 3DEN's ace arsenal attribute.
*
* Arguments:
* 0: Attribute controls group <CONTROL>
* 1: Mode <NUMBER>
*
* Return Value:
* None
*
* Example:
* [CONTROL, 0] call ace_arsenal_fnc_attributeMode
*
* Public: No
*/
params ["_controlsGroup", "_mode"];
TRACE_1("Changing attribute mode",_mode);
// Store mode change
private _attributeValue = uiNamespace getVariable [QGVAR(attributeValue), [[], 0]];
_attributeValue set [1, _mode];
// Change right list button and refresh list items with new mode
(_controlsGroup controlsGroupCtrl IDC_ATTRIBUTE_LIST_RIGHT) ctrlSetText ([SYMBOL_ITEM_VIRTUAL, SYMBOL_ITEM_REMOVE] select _mode);
[_controlsGroup] call FUNC(attributeAddItems);