diff --git a/addons/ui/CfgEventHandlers.hpp b/addons/ui/CfgEventHandlers.hpp index b71643828..6068cb851 100644 --- a/addons/ui/CfgEventHandlers.hpp +++ b/addons/ui/CfgEventHandlers.hpp @@ -38,4 +38,7 @@ class Extended_DisplayLoad_EventHandlers { class RscDisplayCurator { ADDON = QUOTE(_this call (uiNamespace getVariable 'FUNC(initDisplayCurator)')); }; + class RscMsgBox { + ADDON = QUOTE(_this call (uiNamespace getVariable 'FUNC(initDisplayMessageBox)')); + }; }; diff --git a/addons/ui/XEH_preStart.sqf b/addons/ui/XEH_preStart.sqf index 058fadded..daca03422 100644 --- a/addons/ui/XEH_preStart.sqf +++ b/addons/ui/XEH_preStart.sqf @@ -10,6 +10,7 @@ PREP(initDisplayRemoteMissions); PREP(initDisplayDiary); PREP(initDisplay3DEN); PREP(initDisplayCurator); +PREP(initDisplayMessageBox); PREP(preload3DEN); PREP(preloadCurator); diff --git a/addons/ui/fnc_initDisplayMessageBox.sqf b/addons/ui/fnc_initDisplayMessageBox.sqf new file mode 100644 index 000000000..6b5c9615e --- /dev/null +++ b/addons/ui/fnc_initDisplayMessageBox.sqf @@ -0,0 +1,16 @@ +#include "script_component.hpp" + +params ["_display"]; + +private _messageBox = _display displayCtrl IDC_MSG_BOX_MESSAGE; +private _message = ctrlText _messageBox; + +// This check has to work with all languages and without functions defined in mission namespace. +private _isSignatureMissingMessage = _message find (with uiNamespace do { + [localize "str_signature_missing", "%s"] call CBA_fnc_split +} select 1) != -1; + +if (_isSignatureMissingMessage) then { + private _messageBoxHeader = _display displayCtrl 11001; + _messageBoxHeader ctrlSetText toUpper LLSTRING(ContactServerAdmin); +}; diff --git a/addons/ui/stringtable.xml b/addons/ui/stringtable.xml index 818c501d1..f86c25b43 100644 --- a/addons/ui/stringtable.xml +++ b/addons/ui/stringtable.xml @@ -170,5 +170,9 @@ Notification display duration in seconds. Jak dlouho bude upozornění ukázáno (v sekundách). + + Contact the server admin. + Serveradministrator benachrichtigen. +