Skip to content

Commit 7b27ef2

Browse files
authored
Attributes - Add support for dynamic value info (#578)
1 parent ee70745 commit 7b27ef2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

addons/attributes/functions/fnc_open.sqf

+5
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ private _contentPosY = 0;
4848
_ctrlLabel ctrlSetText _displayName;
4949
_ctrlLabel ctrlSetTooltip _tooltip;
5050

51+
// Get dynamic value info for the control if needed
52+
if (_valueInfo isEqualType {}) then {
53+
_valueInfo = _entity call _valueInfo;
54+
};
55+
5156
// Execute attribute control specific init function
5257
private _function = getText (configFile >> _control >> "function");
5358
[_controlsGroup, _entity call _defaultValue, _valueInfo, _entity] call (missionNamespace getVariable _function);

addons/attributes/initAttributes.sqf

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189
"Object",
190190
LSTRING(PlateNumber),
191191
QGVAR(edit),
192-
{_this select [0, MAX_PLATE_CHARACTERS]},
192+
[{_this select [0, MAX_PLATE_CHARACTERS]}],
193193
{
194194
[QEGVAR(common,setPlateNumber), [_entity, _value], _entity] call CBA_fnc_targetEvent;
195195
},

0 commit comments

Comments
 (0)