2015-09-19 18:17:38 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
|
|
|
* Sends a display information hint to a receiver
|
2015-01-16 23:21:47 +00:00
|
|
|
*
|
2015-09-19 18:17:38 +00:00
|
|
|
* Arguments:
|
|
|
|
* 0: receiver <OBJECT>
|
|
|
|
* 1: title <STRING>
|
|
|
|
* 2: content <ARRAY>
|
|
|
|
* 3: type (optional) <NUMBER>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Public: Yes
|
2015-01-16 23:21:47 +00:00
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-09-19 18:17:38 +00:00
|
|
|
params [["_reciever", objNull], ["_title", ""], ["_content", ""], ["_type", 0], ["_parameters", []]];
|
2015-01-16 23:21:47 +00:00
|
|
|
|
|
|
|
if (isPlayer _reciever) then {
|
2015-04-06 16:22:43 +00:00
|
|
|
if (!local _reciever) then {
|
2015-09-19 18:17:38 +00:00
|
|
|
[_this, QFUNC(sendDisplayInformationTo), _reciever, false] call FUNC(execRemoteFnc);
|
2015-04-06 16:22:43 +00:00
|
|
|
} else {
|
|
|
|
if (isLocalized _title) then {
|
|
|
|
_title = localize _title;
|
|
|
|
};
|
2015-09-19 18:17:38 +00:00
|
|
|
|
|
|
|
private "_localizationArray";
|
2015-04-06 16:22:43 +00:00
|
|
|
_localizationArray = [_title];
|
2015-09-19 18:17:38 +00:00
|
|
|
|
2015-04-06 16:22:43 +00:00
|
|
|
{
|
|
|
|
_localizationArray pushback _x;
|
2015-09-19 18:17:38 +00:00
|
|
|
false
|
|
|
|
} count _parameters;
|
|
|
|
|
2015-04-06 16:22:43 +00:00
|
|
|
_title = format _localizationArray;
|
2015-01-16 23:21:47 +00:00
|
|
|
|
2015-04-06 16:22:43 +00:00
|
|
|
{
|
|
|
|
if (isLocalized _x) then {
|
|
|
|
_localizationArray = [localize _x];
|
2015-09-19 18:17:38 +00:00
|
|
|
|
2015-04-06 16:22:43 +00:00
|
|
|
{
|
2015-09-19 18:17:38 +00:00
|
|
|
_localizationArray pushBack _x;
|
|
|
|
false
|
|
|
|
} count _parameters;
|
2015-01-16 23:21:47 +00:00
|
|
|
|
2015-09-19 18:17:38 +00:00
|
|
|
_content set [_forEachIndex, format _localizationArray];
|
2015-04-06 16:22:43 +00:00
|
|
|
};
|
2015-09-19 18:17:38 +00:00
|
|
|
} forEach _content;
|
2015-01-16 23:21:47 +00:00
|
|
|
|
2015-09-19 18:17:38 +00:00
|
|
|
[_title, _content, _type] call FUNC(displayInformation);
|
2015-04-06 16:22:43 +00:00
|
|
|
};
|
2015-09-19 18:17:38 +00:00
|
|
|
};
|