diff --git a/OpenRA.Mods.Common/Widgets/Logic/SettingsLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/SettingsLogic.cs index e0253cd182..651d4d6345 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/SettingsLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/SettingsLogic.cs @@ -221,9 +221,12 @@ namespace OpenRA.Mods.Common.Widgets.Logic BindIntSliderPref(panel, "FRAME_LIMIT_SLIDER", ds, "MaxFramerate"); BindCheckboxPref(panel, "PLAYER_STANCE_COLORS_CHECKBOX", gs, "UsePlayerStanceColors"); - var languageDropDownButton = panel.Get("LANGUAGE_DROPDOWNBUTTON"); - languageDropDownButton.OnMouseDown = _ => ShowLanguageDropdown(languageDropDownButton, modData.Languages); - languageDropDownButton.GetText = () => FieldLoader.Translate(ds.Language); + var languageDropDownButton = panel.GetOrNull("LANGUAGE_DROPDOWNBUTTON"); + if (languageDropDownButton != null) + { + languageDropDownButton.OnMouseDown = _ => ShowLanguageDropdown(languageDropDownButton, modData.Languages); + languageDropDownButton.GetText = () => FieldLoader.Translate(ds.Language); + } var windowModeDropdown = panel.Get("MODE_DROPDOWN"); windowModeDropdown.OnMouseDown = _ => ShowWindowModeDropdown(windowModeDropdown, ds); diff --git a/mods/cnc/chrome/settings.yaml b/mods/cnc/chrome/settings.yaml index 89be0e8b15..2ff727d28f 100644 --- a/mods/cnc/chrome/settings.yaml +++ b/mods/cnc/chrome/settings.yaml @@ -234,44 +234,6 @@ Container@SETTINGS_PANEL: Width: 170 Height: 25 Font: Regular - Label@LOCALIZATION_TITLE: - Y: 265 - Width: PARENT_RIGHT - Font: Bold - Text: Localization - Align: Center - Visible: false - Label@LANGUAGE_LABEL: - X: 230 - WIDTH - 5 - Y: 284 - Width: 75 - Height: 25 - Align: Right - Text: Language: - Visible: false - DropDownButton@LANGUAGE_DROPDOWNBUTTON: - X: 230 - Y: 285 - Width: 200 - Height: 25 - Font: Regular - Visible: false - Label@LANGUAGE_DESC_A: - Y: 310 - Width: PARENT_RIGHT - Height: 25 - Font: Tiny - Align: Center - Text: Language changes will be applied after the game is restarted - Visible: false - Label@LANGUAGE_DESC_B: - Y: 325 - Width: PARENT_RIGHT - Height: 25 - Font: Tiny - Align: Center - Text: Translations apply to text strings only; Speech and build icons will remain in English - Visible: false Container@AUDIO_PANEL: Width: PARENT_RIGHT Height: PARENT_BOTTOM diff --git a/mods/common/chrome/settings.yaml b/mods/common/chrome/settings.yaml index 79e837c9d1..071233193f 100644 --- a/mods/common/chrome/settings.yaml +++ b/mods/common/chrome/settings.yaml @@ -249,43 +249,6 @@ Background@SETTINGS_PANEL: Width: 180 Height: 25 Font: Regular - Label@LOCALIZATION_TITLE: - Y: 270 - Width: PARENT_RIGHT - Font: Bold - Text: Localization - Align: Center - Visible: false - Label@LANGUAGE_LABEL: - X: 230 - WIDTH - 5 - Y: 289 - Width: 75 - Height: 25 - Align: Right - Text: Language: - Visible: false - DropDownButton@LANGUAGE_DROPDOWNBUTTON: - X: 230 - Y: 290 - Width: 200 - Height: 25 - Visible: false - Label@LANGUAGE_DESC_A: - Y: 310 - Width: PARENT_RIGHT - Height: 25 - Font: Tiny - Align: Center - Text: Language changes will be applied after the game is restarted - Visible: false - Label@LANGUAGE_DESC_B: - Y: 325 - Width: PARENT_RIGHT - Height: 25 - Font: Tiny - Align: Center - Text: Translations apply to text strings only; Speech and build icons will remain in English - Visible: false Container@AUDIO_PANEL: X: 5 Y: 50