60 lines
1.7 KiB
Plaintext
60 lines
1.7 KiB
Plaintext
// called from milsim_fnc_processFBCB2RadioFrequencies
|
|
params [
|
|
["_elementCfg", configNull, [configNull]],
|
|
["_shouldProcessChildCfgs", true]
|
|
];
|
|
|
|
if (isNull _elementCfg) exitWith {
|
|
["_elementCfg parameter is NULL"] call BIS_fnc_error;
|
|
};
|
|
|
|
private _battalionElement = _elementCfg;
|
|
|
|
private _recordTitle = format[
|
|
"%1 (%2)",
|
|
getText(_battalionElement >> "callsign"),
|
|
getText(_battalionElement >> "shortDescription")
|
|
];
|
|
// systemChat _recordTitle;
|
|
|
|
private _headers = [
|
|
format[
|
|
"<font size='%1' color='%2' face='%3'>%4</font><br/><br/>",
|
|
milsim_fbcb2_recordTitleSize,
|
|
milsim_fbcb2_recordTitleColor,
|
|
milsim_fbcb2_recordTitleFont,
|
|
_recordTitle
|
|
],
|
|
format[
|
|
"%1<font size='%2' face='%3' color='%4'>- %5%6%7</font><br/><br/>",
|
|
_freqLeadingSpace,
|
|
_ELEMENT_FREQ_SIZE,
|
|
_ELEMENT_FREQ_FONT,
|
|
_FREQ_TEXT_COLOR,
|
|
["ROLE", "right", " ", _FREQ_PAD_LENGTH] call milsim_fnc_padString,
|
|
["SR", "right", " ", _FREQ_PAD_LENGTH] call milsim_fnc_padString,
|
|
"LR"
|
|
]
|
|
];
|
|
|
|
private _allText = [];
|
|
|
|
// get all child elements recursively and format them
|
|
if (_shouldProcessChildCfgs) then {
|
|
[_battalionElement, {
|
|
params ["_cfg", "_recurseCounter"];
|
|
// add config
|
|
private _lines = [_cfg, _recurseCounter+1] call milsim_fnc_formatRadioElementForDiary;
|
|
// private _lines = [_cfg, _indentCount] call t;
|
|
_allText pushBack (_lines joinString "<br/>");
|
|
}] call milsim_fnc_recurseSubclasses;
|
|
} else {
|
|
private _lines = [_battalionElement, 1] call milsim_fnc_formatRadioElementForDiary;
|
|
// private _lines = [_cfg, _indentCount] call t;
|
|
_allText pushBack (_lines joinString "<br/>");
|
|
};
|
|
|
|
|
|
_allText = format["%1<font face='EtelkaMonospaceProBold'>%2</font>", _headers joinString "<br/>", _allText joinString "<br/>"];
|
|
|
|
[_recordTitle, _allText]; |