fn_showNotification.sqf 893 B

123456789101112131415161718192021222324252627282930313233343536
  1. //Notify developers that messages must be limited to 30 characters.
  2. private["_type", "_message", "_detail", "_details", "_target"];
  3. _type = "";
  4. _message = "";
  5. _detail = "";
  6. _details = [];
  7. _hint = [];
  8. _target = true;
  9. {
  10. switch (_x select 0) do
  11. {
  12. case "type": { _type = _x select 1; };
  13. case "message": { _message = _x select 1; };
  14. case "detail": { _detail = _x select 1; };
  15. case "target": { _target = _x select 1; };
  16. case "hint": { _hint = _x select 1; };
  17. }
  18. } forEach _this;
  19. if (_type != "") then
  20. {
  21. if (_detail == "") then
  22. {
  23. _details = [_message];
  24. } else {
  25. _details = [_message, _detail];
  26. };
  27. [[_type, _details], "bis_fnc_showNotification", _target, false] call BIS_fnc_MP;
  28. if ((count _hint) > 0) then { [[_hint, 15], "BIS_fnc_advHint", _target, false] call BIS_fnc_MP; };
  29. } else {
  30. diag_log "::::::::: AW_DEBUG ::::::::: No type given for AW_fnc_showNotification";
  31. };