(c45394988) Refactor and fix button interaction and access checks in the indoors steering manager.

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:40:00 +03:00
parent 704e0731c9
commit ddd84a4f9e
82 changed files with 1867 additions and 1608 deletions
@@ -139,16 +139,12 @@ namespace Barotrauma
{
string newLanguage = obj as string;
if (newLanguage == Language) return true;
UnsavedSettings = true;
Language = newLanguage;
ApplySettings();
var msgBox = new GUIMessageBox(TextManager.Get("RestartRequiredLabel"), TextManager.Get("RestartRequiredLanguage"));
//change fonts to the default font of the new language to make sure
//they can be displayed when for example changing from English to Chinese
var defaultFont = GUI.Style.LoadCurrentDefaultFont();
msgBox.Header.Font = defaultFont;
msgBox.Text.Font = defaultFont;
new GUIMessageBox(TextManager.Get("RestartRequiredLabel"), TextManager.Get("RestartRequiredLanguage"));
return true;
};