diff --git a/ClientCore/ClientConfiguration.cs b/ClientCore/ClientConfiguration.cs index d80fb6a05..b38170d37 100644 --- a/ClientCore/ClientConfiguration.cs +++ b/ClientCore/ClientConfiguration.cs @@ -387,6 +387,11 @@ public IEnumerable SupplementalMapFileExtensions /// public bool DisallowJoiningIncompatibleGames => clientDefinitionsIni.GetBooleanValue(SETTINGS, nameof(DisallowJoiningIncompatibleGames), false); + /// + /// Activates warnings for non-release build of XNA Client + /// + public bool ShowDevelopmentBuildWarnings => clientDefinitionsIni.GetBooleanValue(SETTINGS, nameof(ShowDevelopmentBuildWarnings), true); + #endregion #region Network definitions diff --git a/DXMainClient/DXGUI/GameClass.cs b/DXMainClient/DXGUI/GameClass.cs index 9460f28d1..412d0820e 100644 --- a/DXMainClient/DXGUI/GameClass.cs +++ b/DXMainClient/DXGUI/GameClass.cs @@ -69,12 +69,14 @@ protected override void Initialize() Window.Title = string.IsNullOrEmpty(windowTitle) ? string.Format("{0} Client", MainClientConstants.GAME_NAME_SHORT) : windowTitle; -#if DEVELOPMENT_BUILD { string developBuildTitle = "(Development Build)".L10N("Client:Main:DevelopmentBuildTitle"); - Window.Title += " " + developBuildTitle; - } + +#if DEVELOPMENT_BUILD + if (ClientConfiguration.Instance.ShowDevelopmentBuildWarnings) + Window.Title += " " + developBuildTitle; #endif + } base.Initialize(); diff --git a/DXMainClient/DXGUI/Multiplayer/CnCNet/CnCNetLobby.cs b/DXMainClient/DXGUI/Multiplayer/CnCNet/CnCNetLobby.cs index 6a28676d4..0a9570bb3 100644 --- a/DXMainClient/DXGUI/Multiplayer/CnCNet/CnCNetLobby.cs +++ b/DXMainClient/DXGUI/Multiplayer/CnCNet/CnCNetLobby.cs @@ -567,9 +567,13 @@ private void PostUIInit() { string developBuildWarningMessage = "This is a development build of the client. Stability and reliability may not be fully guaranteed.".L10N("Client:Main:DevelopmentBuildWarning"); + #if DEVELOPMENT_BUILD - connectionManager.MainChannel.AddMessage(new ChatMessage(Color.Red, Renderer.GetSafeString( - developBuildWarningMessage, lbChatMessages.FontIndex))); + if (ClientConfiguration.Instance.ShowDevelopmentBuildWarnings) + { + connectionManager.MainChannel.AddMessage(new ChatMessage(Color.Red, Renderer.GetSafeString( + developBuildWarningMessage, lbChatMessages.FontIndex))); + } #endif }