From c96c9ff265b6f5cfe8e72d6c982f20f34db78aa6 Mon Sep 17 00:00:00 2001 From: Federico Cecchetto Date: Fri, 15 Jul 2022 03:52:46 +0200 Subject: [PATCH] Small fix --- data/ui_scripts/settings/__init__.lua | 4 +--- data/ui_scripts/settings/language.lua | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/data/ui_scripts/settings/__init__.lua b/data/ui_scripts/settings/__init__.lua index 093bd510..627ac784 100644 --- a/data/ui_scripts/settings/__init__.lua +++ b/data/ui_scripts/settings/__init__.lua @@ -1,6 +1,4 @@ -if (Engine.InFrontend()) then - require("language") -end +require("language") game:addlocalizedstring("MENU_GENERAL", "GENERAL") game:addlocalizedstring("MENU_GENERAL_DESC", "Set the client's settings.") diff --git a/data/ui_scripts/settings/language.lua b/data/ui_scripts/settings/language.lua index 2d63863a..d0d80626 100644 --- a/data/ui_scripts/settings/language.lua +++ b/data/ui_scripts/settings/language.lua @@ -89,6 +89,33 @@ LUI.UIButtonText.IsOffsetedLanguage = function() end end +local lang = Engine.GetCurrentLanguage() +if (lang == 5 or lang == 6 or lang == 17) then + local scale = function (size) + return size * 720 / 1080 + end + + CoD.TextSettings.SP_HudAmmoStatusText = { + Font = RegisterFont("fonts/bank.ttf", 16), + Height = 16 + } + + CoD.TextSettings.SP_HudAmmoCounterFont = { + Font = RegisterFont("fonts/bank.ttf", 34), + Height = 34 + } + + CoD.TextSettings.HudAmmoCounterFont = { + Font = RegisterFont("fonts/bank.ttf", 105), + Height = 64 + } + + CoD.TextSettings.H2TitleFont = { + Font = RegisterFont("fonts/bank.ttf", 56), + Height = scale(56) + } +end + LUI.MenuBuilder.registerType("choose_language_menu", function(a1) local menu = LUI.MenuTemplate.new(a1, { menu_title = "@LUA_MENU_CHOOSE_LANGUAGE",