2015-08-07 17:11:27 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
|
|
|
* Update the quick view log
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: display <DISPLAY>
|
|
|
|
* 1: log collection <ARRAY>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
2015-10-13 07:01:59 +00:00
|
|
|
* [some_display, log] call ace_medical_menu_fnc_updateQuickViewLog
|
2015-08-07 17:11:27 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
params ["_display", "_logs"];
|
|
|
|
|
2016-06-13 10:49:35 +00:00
|
|
|
private _logCtrl = _display displayCtrl 215;
|
2015-08-07 17:11:27 +00:00
|
|
|
lbClear _logCtrl;
|
|
|
|
|
|
|
|
{
|
2015-10-13 07:01:59 +00:00
|
|
|
_x params ["_message", "_moment", "", "_arguments"];
|
2015-08-07 17:11:27 +00:00
|
|
|
|
|
|
|
{
|
2015-11-20 17:40:31 +00:00
|
|
|
if (_x isEqualType "" && {isLocalized _x}) then {
|
2015-08-07 17:11:27 +00:00
|
|
|
_arguments set [_foreachIndex, localize _x];
|
|
|
|
};
|
|
|
|
} forEach _arguments;
|
|
|
|
|
2016-06-13 10:49:35 +00:00
|
|
|
_message = format ([([_message, localize _message] select (isLocalized _message))] + _arguments);
|
2015-08-07 17:11:27 +00:00
|
|
|
_logCtrl lbAdd format ["%1 %2", _moment, _message];
|
|
|
|
nil
|
|
|
|
} count _logs;
|