Skip to content

Commit

Permalink
Merge pull request #1212 from CBATeam/fixed-error-messages
Browse files Browse the repository at this point in the history
add CONTACT SERVER ADMIN header to signature mismatch message
  • Loading branch information
commy2 authored Sep 9, 2019
2 parents 8274a56 + eee311b commit 3a54a99
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
3 changes: 3 additions & 0 deletions addons/ui/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)'));
};
};
1 change: 1 addition & 0 deletions addons/ui/XEH_preStart.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ PREP(initDisplayRemoteMissions);
PREP(initDisplayDiary);
PREP(initDisplay3DEN);
PREP(initDisplayCurator);
PREP(initDisplayMessageBox);

PREP(preload3DEN);
PREP(preloadCurator);
16 changes: 16 additions & 0 deletions addons/ui/fnc_initDisplayMessageBox.sqf
Original file line number Diff line number Diff line change
@@ -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);
};
4 changes: 4 additions & 0 deletions addons/ui/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -170,5 +170,9 @@
<English>Notification display duration in seconds.</English>
<Czech>Jak dlouho bude upozornění ukázáno (v sekundách).</Czech>
</Key>
<Key ID="STR_CBA_Ui_ContactServerAdmin">
<English>Contact the server admin.</English>
<German>Serveradministrator benachrichtigen.</German>
</Key>
</Package>
</Project>

0 comments on commit 3a54a99

Please sign in to comment.